-
-
Notifications
You must be signed in to change notification settings - Fork 93
/
.flake8
58 lines (54 loc) · 2.11 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
53
54
55
56
57
58
[flake8]
count = true
# A002: Argument is shadowing a python builtin.
# A003: Class attribute is shadowing a python builtin.
# A005: Module is shadowing a python builtin module.
# 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).
# E701, E704: Multiple statements on one line (conflicts with ruff, but it will be enforced by it anyways).
# T101: TO-DO comment detection (T102 is FIX-ME and T103 is XXX).
# S101: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
# W503: line break before binary operator (too many false positives and doesnt match our style)
# W504: line break after binary operator (too many false positives and doesnt match our style)
ignore =
A002,
A003,
A005,
CFQ002,
CFQ004,
D102,
D105,
D412,
E402,
E701,
E704,
T101,
S101,
W503,
W504,
# F401: unused import.
# F403: cannot detect unused vars if we use starred import
# FS003: f-string missing prefix.
# S106: possible 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/api/__init__.py: F401,F403
hikari/events/__init__.py: F401,F403
hikari/impl/__init__.py: F401,F403
hikari/interactions/__init__.py: F401,F403
hikari/internal/routes.py: FS003
hikari/internal/time.py: FS003
tests/hikari/*: FS003,S106,D106,D104,D103,D101,D100,S105
max-complexity = 20
max-function-length = 130
# Technically this is 120, but ruff 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