Skip to content

Commit 28eaf9a

Browse files
committed
Add static check with "avocado-static-checks"
Adds a Python module import order check, and code style check. This is based on "avocado-static-checks", which is being added here as a submodule. On CI, it uses the "avocado-ci-tools" actions to check out and run it, but the same can be done locally with the submodule. Signed-off-by: Cleber Rosa <[email protected]>
1 parent 1a51f72 commit 28eaf9a

22 files changed

+1451
-791
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,13 @@ jobs:
2121
python-version: ${{ matrix.python-version }}
2222
- run: pip install -r requirements-travis.txt
2323
- run: make check
24+
25+
static-checks:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Check out repository code
29+
uses: actions/checkout@v4
30+
- name: run static checks
31+
uses: avocado-framework/avocado-ci-tools@main
32+
with:
33+
avocado-static-checks: true

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[submodule "avocado-static-checks"]
2+
path = static-checks
3+
url = ../avocado-static-checks
4+
branch = main

aexpect/__init__.py

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,24 @@
1414
entry-points.
1515
"""
1616

17-
from .exceptions import ExpectError
18-
from .exceptions import ExpectProcessTerminatedError
19-
from .exceptions import ExpectTimeoutError
20-
from .exceptions import ShellCmdError
21-
from .exceptions import ShellError
22-
from .exceptions import ShellProcessTerminatedError
23-
from .exceptions import ShellStatusError
24-
from .exceptions import ShellTimeoutError
25-
26-
from .client import Spawn
27-
from .client import Tail
28-
from .client import Expect
29-
from .client import ShellSession
30-
from .client import kill_tail_threads
31-
from .client import run_tail
32-
from .client import run_bg
33-
from .client import run_fg
34-
35-
from . import remote
36-
from . import rss_client
17+
from . import remote, rss_client
18+
from .client import (
19+
Expect,
20+
ShellSession,
21+
Spawn,
22+
Tail,
23+
kill_tail_threads,
24+
run_bg,
25+
run_fg,
26+
run_tail,
27+
)
28+
from .exceptions import (
29+
ExpectError,
30+
ExpectProcessTerminatedError,
31+
ExpectTimeoutError,
32+
ShellCmdError,
33+
ShellError,
34+
ShellProcessTerminatedError,
35+
ShellStatusError,
36+
ShellTimeoutError,
37+
)

0 commit comments

Comments
 (0)