-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.flake8
46 lines (36 loc) · 1.58 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
[flake8]
# It's 2021. We can fit more than 80 columns on today's terminals
max-line-length = 100
# B902
#
# This complains about catching `Exception`. The idea is a noble one.
# However, Python lacks checked exceptions and is not very formal in
# documenting exceptions that can be thrown by varions methods. For
# example, there appears to be no mention in the Python documentation
# about exceptions that could be thrown by IO.close(). However,
# https://github.com/python/cpython/blob/master/Modules/_io/fileio.c
# indicates that close() can throw an OSError. There is no other
# reasonable solution to catching exceptions thrown by methods
# whose exceptions are unspecified than catching generic exceptions.
# D401 - "First line should be in imperative mood".
#
# It's somewhat ironic that a language with such a lax type system
# have such a rigid style spec.
# D100 - "Missing docstring in public module"
#
# It is more common than not in this implementation for a module to
# contain a single class. Consequently, module docstrings are mostly
# redundant.
# W503 - "Line break before binary operator"
#
# Well, so "Line break after binary operator" also gives a warning,
# which means there's no way to break long lines of consecutive
# binary operators! Welcome to Python.
#
# See https://www.python.org/dev/peps/pep-0008/#should-a-line-break-before-or-after-a-binary-operator
# for a discussion about the issue and why we disable this.
ignore = B902, D401, D100, W503
# D103 - Missing docstring in public function
#
# Ignore docstrings requirement in tests
per-file-ignores = tests/*:D103