diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..7b3133a --- /dev/null +++ b/.flake8 @@ -0,0 +1,13 @@ +[flake8] +extend-ignore = + Q0, E501, C812, E203, W503 # These default to arguing with Black. We might configure some of them eventually + ANN204, ANN206, # return annotations for special methods and class methods + D105, D107, # Missing Docstrings in magic method and __init__ + S311, # Standard pseudo-random generators are not suitable for security/cryptographic purposes. + D401, # First line should be in imperative mood; try rephrasing + D400, # First line should end with a period + D101, # Missing docstring in public class + + # Plugins we don't currently include: flake8-return + R503, # missing explicit return at the end of function ableto return non-None value. +max-line-length=100 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7034078..b88c6fe 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,9 +4,12 @@ repos: hooks: - id: check-toml - id: check-yaml + args: [--unsafe] - id: check-merge-conflict - id: requirements-txt-fixer - id: end-of-file-fixer + - id: debug-statements + language_version: python3.10 - id: trailing-whitespace args: [--markdown-linebreak-ext=md] @@ -19,7 +22,8 @@ repos: rev: 22.1.0 hooks: - id: black - args: [--line-length=100, --fast, --target-version=py310] + args: [--line-length=100, --target-version=py310] + language_version: python3.10 - repo: https://github.com/pre-commit/mirrors-isort rev: V5.10.1 @@ -32,7 +36,14 @@ repos: hooks: - id: flake8 additional_dependencies: - - flake8-annotations~=2.7 + - flake8-annotations~=2.0 - flake8-bandit~=2.1 - - flake8-docstrings~=1.6 - args: [--max-line-length=100, --ignore=ANN101 D107 ANN102 ANN206 D105 ANN204 E203] + - flake8-docstrings~=1.5 + - flake8-bugbear + - flake8-comprehensions + - flake8-quotes + - flake8-raise + - flake8-deprecated + - flake8-print + - flake8-return + language_version: python3.10