Skip to content

Commit

Permalink
Added pre-commit checker
Browse files Browse the repository at this point in the history
  • Loading branch information
spirosmaggioros committed Jul 17, 2024
1 parent c6f2461 commit 661033e
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .pre-commit-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
repos:
- repo: https://github.com/ambv/black
rev: 24.3.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.11.5
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/pycqa/flake8
rev: 5.0.4
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
hooks:
- id: mypy
args: ["--ignore-missing-imports"]
41 changes: 41 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[metadata]
long_description = file: README.md
long_description_content_type = text/markdown

[options]
test_suite = tests

[aliases]
test=pytest

[flake8]
statistics = true
exclude = .git
ignore = E203, E501, W503, B950
select = B,C,E,F,W,T4,B9
per-file-ignores =
__init__.py: F401, F403

[mypy]
# Import discovery
namespace_packages = False
ignore_missing_imports = True

# Untyped definitions and calls
disallow_untyped_calls = True
disallow_untyped_defs = True
disallow_incomplete_defs = True
disallow_untyped_decorators = True

# Configuring warnings
warn_redundant_casts = True
warn_unused_ignores = True
warn_no_return = True
warn_return_any = True
warn_unreachable = True

# Miscellaneous strictness flags
strict_equality = True

[mypy-tests.*]
ignore_errors = True

0 comments on commit 661033e

Please sign in to comment.