diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 7b7dcaf..14dbae5 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -10,19 +10,18 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - # NB: v1.4.0 covers Python 3.8. - - uses: ricardochaves/python-lint@v1.4.0 + - uses: actions/setup-python@v5 with: - python-root-list: lddtree.py pylint - use-pylint: true - use-pycodestyle: false - use-flake8: false - use-black: true - use-mypy: true - use-isort: true - extra-pylint-options: "" - extra-pycodestyle-options: "" - extra-flake8-options: "" - extra-black-options: "" - extra-mypy-options: "" - extra-isort-options: "" + python-version: '3.x' + - name: install dependencies + run: | + python -m pip install pylint mypy black 'isort[colors]' + # mypy dependencies for following imported types + python -m pip install argcomplete + - run: pylint --output-format colorized lddtree.py + - run: mypy lddtree.py + env: + TERM: xterm-color + MYPY_FORCE_COLOR: 1 + - run: black --check --diff --color lddtree.py + - run: isort --check --diff --color lddtree.py diff --git a/lddtree.py b/lddtree.py index 8ccd855..0782c1b 100755 --- a/lddtree.py +++ b/lddtree.py @@ -56,7 +56,7 @@ # Disable import errors for all 3rd party modules. # pylint: disable=import-error try: - import argcomplete # type: ignore + import argcomplete except ImportError: argcomplete = cast(Any, None)