forked from zodb/relstorage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pylintrc
126 lines (106 loc) · 4.92 KB
/
.pylintrc
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#[MASTER]
# These need examined and fixed on a case-by-case basis.
#load-plugins=pylint.extensions.bad_builtin,pylint.extensions.check_elif,pylint.extensions.comparetozero,pylint.extensions.emptystring
[MESSAGES CONTROL]
# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once).
# NOTE: comments must go ABOVE the statement. In Python 2, mixing in
# comments disables all directives that follow, while in Python 3, putting
# comments at the end of the line does the same thing (though Py3 supports
# mixing)
# invalid-name, ; Things like loadBlob get flagged
# protected-access, ; We have many cases of this; legit ones need to be examinid and commented, then this removed
# no-self-use, ; common in superclasses with extension points
# too-few-public-methods, ; Exception and marker classes get tagged with this
# exec-used, ; should tag individual instances with this, there are some but not too many
# global-statement, ; should tag individual instances
# multiple-statements, ; "from gevent import monkey; monkey.patch_all()"
# locally-disabled, ; yes, we know we're doing this. don't replace one warning with another
# cyclic-import, ; most of these are deferred imports
# too-many-arguments, ; these are almost always because that's what the stdlib does
# redefined-builtin, ; likewise: these tend to be keyword arguments like len= in the stdlib
# undefined-all-variable, ; XXX: This crashes with pylint 1.5.4 on Travis (but not locally on Py2/3
# ; or landscape.io on Py3). The file causing the problem is unclear. UPDATE: identified and disabled
# that file.
# see https://github.com/PyCQA/pylint/issues/846
# useless-suppression: the only way to avoid repeating it for specific statements everywhere that we
# do Py2/Py3 stuff is to put it here. Sadly this means that we might get better but not realize it.
# chained-comparison: It wants you to rewrite `x > 2 and x < 3` using something like `2 < x < 3`,
# which I don't like, I find that less readable.
# import-outside-toplevel: New in pylint 2.4. We have a large number of deferred imports.
# super-with-arguments and raise-missing-from: New in pylint 2.7; we can't use them because
# we support Python 2.
# consider-using-with: New in pylint 2.8, catches things like ``return open(path)``, which
# obviously can't use a ``with`` statement. Disabled as 90% of hits (~20) were a false positive,
# and a few didn't apply to Python 2.
disable=
invalid-name,
missing-docstring,
ungrouped-imports,
protected-access,
no-self-use,
too-few-public-methods,
exec-used,
global-statement,
multiple-statements,
locally-disabled,
cyclic-import,
too-many-arguments,
redefined-builtin,
useless-suppression,
duplicate-code,
inconsistent-return-statements,
useless-object-inheritance,
chained-comparison,
too-many-ancestors,
import-outside-toplevel,
relative-beyond-top-level,
super-with-arguments,
raise-missing-from,
consider-using-with
# undefined-all-variable
[IMPORTS]
# It's common to have ZODB and a few closely related dependencies
# installed in the virtual environment with us. That causes it to be
# recognized as first party, meaning that it is suddenly sorted
# incorrectly compared to other third party imports such as zope.
known-third-party=ZODB,transaction
[FORMAT]
# duplicated from setup.cfg
max-line-length=100
[MISCELLANEOUS]
# List of note tags to take in consideration, separated by a comma.
#notes=FIXME,XXX,TODO
# Disable that, we don't want them in the report (???)
notes=
[VARIABLES]
dummy-variables-rgx=_.*
[TYPECHECK]
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E1101 when accessed. Python regular
# expressions are accepted.
# gevent: this is helpful for py3/py2 code.
generated-members=exc_clear,cache_checker,adapter
# List of classes names for which member attributes should not be checked
# (useful for classes with attributes dynamically set). This supports can work
# with qualified names.
ignored-classes=SectionValue,Lazy,_v_c,c
# List of module names for which member attributes should not be checked
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis. It
# supports qualified module names, as well as Unix pattern matching.
ignored-modules=
[DESIGN]
max-attributes=15
max-locals=20
[BASIC]
# Prospector turns on unsafe-load-any-extension by default, but
# pylint leaves it off. This is the proximal cause of the
# undefined-all-variable crash.
unsafe-load-any-extension = yes
property-classes=zope.cachedescriptors.property.Lazy,zope.cachedescriptors.property.Cached,relstorage._util.Lazy
# Local Variables:
# mode: conf-space
# End: