-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.flake8
52 lines (46 loc) · 1.84 KB
/
.flake8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Unfortunately, Flake8 does not support pyproject.toml configuration.
# https://github.com/PyCQA/flake8/issues/234
#
# More details regarding Flake8 and Black interplay:
# https://github.com/psf/black/blob/main/docs/guides/using_black_with_other_tools.md#flake8
[flake8]
# Enable a few additional checks.
#
# https://github.com/PyCQA/flake8-bugbear#how-to-enable-opinionated-warnings
# B9: Bugbear's extended opinionated checks
#
# https://pycodestyle.pycqa.org/en/latest/intro.html#error-codes
# W504: line break after binary operator (Black compliant)
extend-select = B9, W504
# Disable several warnings that don't play nice with PEP8 or Black,
# or that are a bit of a nuisance in general.
#
# http://www.pydocstyle.org/en/latest/error_codes.html
# D105: Missing docstring in magic method
#
# https://pycodestyle.pycqa.org/en/latest/intro.html#error-codes
# E203: whitespace before ‘,’, ‘;’, or ‘:’ (not Black compliant)
# E501: line too long (managed better by Bugbear's B950)
# W503: line break before binary operator (not Black compliant)
#
# https://github.com/peterjc/flake8-rst-docstrings#configuration
# RST307: Error in "XXX" directive
ignore = D105, E203, E501, RST307, W503
per-file-ignores =
# More assorted goodness.
max-line-length = 120
show-source = true
# Ensure that Flake8 warnings are silenced correctly:
# https://github.com/plinss/flake8-noqa#options
noqa-require-code = true
# Ensure that Sphinx extensions of .rst are recognized:
# https://github.com/peterjc/flake8-rst-docstrings#configuration
rst-roles = class, func, ref
rst-directives = envvar, exception
rst-substitutions = version
# Ensure that Sphinx docstrings use Numpy format for docstrings:
# https://github.com/PyCQA/flake8-docstrings
#
# For details on the Numpy format:
# https://www.sphinx-doc.org/en/master/usage/extensions/example_numpy.html
docstring-convention = numpy