-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathpylintrc
More file actions
60 lines (50 loc) · 1.89 KB
/
pylintrc
File metadata and controls
60 lines (50 loc) · 1.89 KB
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
59
60
[MASTER]
# Pickle collected data for later comparisons.
persistent=no
init-hook=
import os
import sys
import subprocess
gitrootdir = subprocess.check_output(["git", "rev-parse", "--show-toplevel"]).decode("utf-8").strip()
sys.path.insert(0, gitrootdir)
sys.path.insert(0, os.path.join(gitrootdir, ".pylintrc"))
# Our own pylint transformations.
load-plugins=pylintrc
# Reasoning for class ignore
# --------------------------
# RState, TState
# Pylint doesn't parse the meta-class to detect the attributes.
ignored-classes=RState,TState
# Reasoning for ignored modules
# -----------------------------
# alembic:
# Pylint entirely fails to parse the module.
# Example error: Module 'alembic.op' has no 'drop_index' member
ignored-modules=alembic,setproctitle
[MESSAGES CONTROL]
# Reasoning for wide warning ignore
# ---------------------------------
# useless-object-inheritance
# We support python 2.
# import-error
# This is to work-around the issues in our diff-lint CI where we do not have
# all the build/runtime requirements installed. We can ignore this error
# because the packaging CI would actually discover the import issues anyway.
# too-few-public-methos
# Deliberately using classes instead of namedtuple, because it helps us with
# typing (completion).
# consider-using-f-string
# We still support EPEL7.
# too-many-lines
# too-many-locals
# too-many-branches
# Stylis errors that are low-priority, and sometimes hard to avoid.
disable=useless-object-inheritance,import-error,too-few-public-methods,consider-using-f-string,too-many-lines,too-many-locals,too-many-branches
[DESIGN]
min-public-methods=1
# evision|down_revision|branch_labels|depends_on is for alembic
[BASIC]
const-rgx=^(([A-Z_][A-Z0-9_]*)|(__.*__)|revision|down_revision|branch_labels|depends_on)$
[FORMAT]
# Maximum number of characters on a single line.
max-line-length=120