Update pre-commit

This commit is contained in:
Zeva Rose 2022-02-04 12:15:21 -07:00
parent 56bd5edc93
commit 56661d96b8
2 changed files with 28 additions and 4 deletions

13
.flake8 Normal file
View file

@ -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

View file

@ -4,9 +4,12 @@ repos:
hooks: hooks:
- id: check-toml - id: check-toml
- id: check-yaml - id: check-yaml
args: [--unsafe]
- id: check-merge-conflict - id: check-merge-conflict
- id: requirements-txt-fixer - id: requirements-txt-fixer
- id: end-of-file-fixer - id: end-of-file-fixer
- id: debug-statements
language_version: python3.10
- id: trailing-whitespace - id: trailing-whitespace
args: [--markdown-linebreak-ext=md] args: [--markdown-linebreak-ext=md]
@ -19,7 +22,8 @@ repos:
rev: 22.1.0 rev: 22.1.0
hooks: hooks:
- id: black - 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 - repo: https://github.com/pre-commit/mirrors-isort
rev: V5.10.1 rev: V5.10.1
@ -32,7 +36,14 @@ repos:
hooks: hooks:
- id: flake8 - id: flake8
additional_dependencies: additional_dependencies:
- flake8-annotations~=2.7 - flake8-annotations~=2.0
- flake8-bandit~=2.1 - flake8-bandit~=2.1
- flake8-docstrings~=1.6 - flake8-docstrings~=1.5
args: [--max-line-length=100, --ignore=ANN101 D107 ANN102 ANN206 D105 ANN204 E203] - flake8-bugbear
- flake8-comprehensions
- flake8-quotes
- flake8-raise
- flake8-deprecated
- flake8-print
- flake8-return
language_version: python3.10