Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#57)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/mirrors-mypy: v0.991 → v1.1.1](pre-commit/mirrors-mypy@v0.991...v1.1.1)
- [github.com/psf/black: 22.12.0 → 23.1.0](psf/black@22.12.0...23.1.0)
- [github.com/PyCQA/bandit: 1.7.4 → 1.7.5](PyCQA/bandit@1.7.4...1.7.5)
- [github.com/crate-ci/typos: typos-dict-v0.9.15 → typos-dict-v0.9.23](crate-ci/typos@typos-dict-v0.9.15...typos-dict-v0.9.23)
- [github.com/pycqa/autoflake: v2.0.0 → v2.0.2](PyCQA/autoflake@v2.0.0...v2.0.2)

* Use poetry to run pytest locally

* Ignore typing issue

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Felix Uellendall <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and feluelle authored Mar 18, 2023
1 parent d08a5f4 commit deec882
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 7 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
rev: v1.1.1
hooks:
- id: mypy
additional_dependencies:
Expand All @@ -46,7 +46,7 @@ repos:
hooks:
- id: yesqa
- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.1.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
Expand All @@ -58,7 +58,7 @@ repos:
- flake8-bugbear
- flake8-builtins
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
rev: 1.7.5
hooks:
- id: bandit
args: ["-c", ".bandit"]
Expand All @@ -76,21 +76,19 @@ repos:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/crate-ci/typos
rev: typos-dict-v0.9.15
rev: typos-dict-v0.9.23
hooks:
- id: typos
- repo: https://github.com/pycqa/autoflake
rev: v2.0.0
rev: v2.0.2
hooks:
- id: autoflake
args: ["--remove-all-unused-imports", "--in-place"]
- repo: local
hooks:
- id: pytest
name: Run pytest
entry: .venv/bin/pytest tests/
language: script
entry: poetry run pytest tests/
language: system
pass_filenames: false
# alternatively you could `types: [python]` so it only runs when python files change
# though tests might be invalidated if you were to say change a data file
always_run: true
2 changes: 1 addition & 1 deletion airflint/rules/use_jinja_variable_get.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def _lookup_template_fields(self, keyword: ast.keyword) -> None:
and isinstance(target := stmt.target, ast.Name)
# E.g. <name> = (..., )
or isinstance(stmt, ast.Assign)
and isinstance(target := stmt.targets[0], ast.Name)
and isinstance(target := stmt.targets[0], ast.Name) # type: ignore[assignment]
)
and target.id == "template_fields"
and isinstance(stmt.value, ast.Tuple)
Expand Down

0 comments on commit deec882

Please sign in to comment.