Skip to content

Commit

Permalink
Add static check with "avocado-static-checks"
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
clebergnu committed Feb 20, 2024
1 parent 1a51f72 commit 28eaf9a
Show file tree
Hide file tree
Showing 22 changed files with 1,451 additions and 791 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,13 @@ jobs:
python-version: ${{ matrix.python-version }}
- run: pip install -r requirements-travis.txt
- run: make check

static-checks:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: run static checks
uses: avocado-framework/avocado-ci-tools@main
with:
avocado-static-checks: true
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "avocado-static-checks"]
path = static-checks
url = ../avocado-static-checks
branch = main
41 changes: 21 additions & 20 deletions aexpect/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,24 @@
entry-points.
"""

from .exceptions import ExpectError
from .exceptions import ExpectProcessTerminatedError
from .exceptions import ExpectTimeoutError
from .exceptions import ShellCmdError
from .exceptions import ShellError
from .exceptions import ShellProcessTerminatedError
from .exceptions import ShellStatusError
from .exceptions import ShellTimeoutError

from .client import Spawn
from .client import Tail
from .client import Expect
from .client import ShellSession
from .client import kill_tail_threads
from .client import run_tail
from .client import run_bg
from .client import run_fg

from . import remote
from . import rss_client
from . import remote, rss_client
from .client import (
Expect,
ShellSession,
Spawn,
Tail,
kill_tail_threads,
run_bg,
run_fg,
run_tail,
)
from .exceptions import (
ExpectError,
ExpectProcessTerminatedError,
ExpectTimeoutError,
ShellCmdError,
ShellError,
ShellProcessTerminatedError,
ShellStatusError,
ShellTimeoutError,
)
Loading

0 comments on commit 28eaf9a

Please sign in to comment.