forked from hikari-py/hikari
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.flake8
40 lines (36 loc) · 1.78 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
[flake8]
count = true
ignore =
A002, # Argument is shadowing a python builtin.
A003, # Class attribute is shadowing a python builtin.
CFQ002, # Function has too many arguments.
CFQ004, # Function has too many returns.
D102, # Missing docstring in public method.
D105, # Magic methods not having a docstring.
D412, # No blank lines allowed between a section header and its content
E402, # Module level import not at top of file (isn't compatible with our import style).
IFSTMT001 # "use a oneliner here".
T101, # TO-DO comment detection (T102 is FIX-ME and T103 is XXX).
W503, # line break before binary operator.
W504, # line break before binary operator (again, I guess).
S101, # Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
# F401: unused import.
# F403: cannot detect unused vars if we use starred import
# FS003: f-string missing prefix.
# R102: unnecessary parenthesis on raised exception (raises false positives in places)
# S106: posible hardcoded password (we dont care about this in the tests)
# D106, D104, D103, D101, D100: Missing docstring in public function/class/module (ignore in tests)
per-file-ignores =
hikari/__init__.py: F401,F403
hikari/events/__init__.py: F401,F403
hikari/internal/routes.py: FS003
hikari/internal/time.py: FS003
tests/hikari/*: FS003,S106,D106,D104,D103,D101,D100
max-complexity = 20
max-function-length = 130
# Technically this is 120, but black has a policy of "1 or 2 over is fine if it is tidier", so we have to raise this.
max-line-length = 130
show_source = False
statistics = False
accept-encodings = utf-8
docstring-convention = numpy