Skip to content

Commit

Permalink
Add mypy linter step
Browse files Browse the repository at this point in the history
  • Loading branch information
reweeden committed Jan 24, 2025
1 parent 86afe36 commit 445fe28
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:

jobs:
lint:
flake8:
runs-on: ubuntu-latest

steps:
Expand All @@ -15,4 +15,21 @@ jobs:
- uses: TrueBrain/actions-flake8@v2
with:
flake8_version: 6.0.0
plugins: flake8-isort==6.1.1 flake8-quotes==3.4.0 flake8-commas==4.0.0
plugins: flake8-isort==6.1.1 flake8-quotes==3.4.0 flake8-commas==4.0.0

mypy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9

- run: pip install mypy==1.14.1

- run: |
mypy \
--non-interactive \
--install-types \
.

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions Job or Workflow does not set permissions
11 changes: 11 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,14 @@ markers = [

[tool.isort]
profile = "black"

[tool.mypy]
# warn_redundant_casts = true
# warn_unused_ignores = true
# warn_unreachable = true
# strict_equality = true
# check_untyped_defs = true
# install_types = true
# non_interactive = true
# pretty = true
disable_error_code = ["import-untyped"]

0 comments on commit 445fe28

Please sign in to comment.