diff --git a/.pre-commit-config.yml b/.pre-commit-config.yml new file mode 100644 index 0000000..fc84919 --- /dev/null +++ b/.pre-commit-config.yml @@ -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"] diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..1b943de --- /dev/null +++ b/setup.cfg @@ -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