blob: ebe9d507cddb5ef1e5e9642500987ba352c33c7f [file] [log] [blame]
Mehrdad Afsharib9424d02018-04-18 12:30:28 -07001[VARIABLES]
2
3# TODO(https://github.com/PyCQA/pylint/issues/1345): How does the inspection
4# not include "unused_" and "ignored_" by default?
5dummy-variables-rgx=^ignored_|^unused_
6
7[DESIGN]
8
9# NOTE(nathaniel): Not particularly attached to this value; it just seems to
10# be what works for us at the moment (excepting the dead-code-walking Beta
11# API).
12max-args=6
13
14[MISCELLANEOUS]
15
16# NOTE(nathaniel): We are big fans of "TODO(<issue link>): " and
17# "NOTE(<username or issue link>): ". We do not allow "TODO:",
18# "TODO(<username>):", "FIXME:", or anything else.
19notes=FIXME,XXX
20
21[MESSAGES CONTROL]
22
23disable=
24 # These suppressions are specific to tests:
25 #
26 # TODO(https://github.com/grpc/grpc/issues/261): investigate
27 # each of the following one by one and consider eliminating
28 # the suppression category.
29 # Eventually, the hope is to eliminate the .pylintrc-tests
30 # altogether and rely on .pylintrc for everything.
31 pointless-statement,
32 no-member,
33 no-self-use,
34 attribute-defined-outside-init,
35 unused-argument,
36 unused-variable,
37 unused-import,
38 redefined-builtin,
39 too-many-public-methods,
40 too-many-locals,
41 redefined-variable-type,
Mehrdad Afsharib9424d02018-04-18 12:30:28 -070042 redefined-outer-name,
Mehrdad Afsharib9424d02018-04-18 12:30:28 -070043 ungrouped-imports,
44 too-many-branches,
45 too-many-arguments,
46 too-many-format-args,
47 too-many-return-statements,
48 too-many-statements,
Mehrdad Afsharib9424d02018-04-18 12:30:28 -070049 line-too-long,
Mehrdad Afsharib9424d02018-04-18 12:30:28 -070050 wrong-import-position,
51 wrong-import-order,
Mehrdad Afsharib9424d02018-04-18 12:30:28 -070052 # -- END OF TEST-SPECIFIC SUPPRESSIONS --
53
54
55 # TODO(https://github.com/PyCQA/pylint/issues/59#issuecomment-283774279):
56 # Enable cyclic-import after a 1.7-or-later pylint release that
57 # recognizes our disable=cyclic-import suppressions.
58 cyclic-import,
59 # TODO(https://github.com/grpc/grpc/issues/8622): Enable this after the
60 # Beta API is removed.
61 duplicate-code,
62 # TODO(https://github.com/grpc/grpc/issues/261): Doesn't seem to
63 # understand enum and concurrent.futures; look into this later with the
64 # latest pylint version.
65 import-error,
66 # TODO(https://github.com/grpc/grpc/issues/261): Enable this one.
67 # Should take a little configuration but not much.
68 invalid-name,
69 # TODO(https://github.com/grpc/grpc/issues/261): This doesn't seem to
70 # work for now? Try with a later pylint?
71 locally-disabled,
72 # NOTE(nathaniel): What even is this? *Enabling* an inspection results
73 # in a warning? How does that encourage more analysis and coverage?
74 locally-enabled,
75 # NOTE(nathaniel): We don't write doc strings for most private code
76 # elements.
77 missing-docstring,
78 # NOTE(nathaniel): In numeric comparisons it is better to have the
79 # lesser (or lesser-or-equal-to) quantity on the left when the
80 # expression is true than it is to worry about which is an identifier
81 # and which a literal value.
82 misplaced-comparison-constant,
83 # NOTE(nathaniel): Our completely abstract interface classes don't have
84 # constructors.
85 no-init,
86 # TODO(https://github.com/grpc/grpc/issues/261): Doesn't yet play
87 # nicely with some of our code being implemented in Cython. Maybe in a
88 # later version?
89 no-name-in-module,
90 # TODO(https://github.com/grpc/grpc/issues/261): Suppress these where
91 # the odd shape of the authentication portion of the API forces them on
92 # us and enable everywhere else.
93 protected-access,
94 # NOTE(nathaniel): Pylint and I will probably never agree on this.
95 too-few-public-methods,
96 # NOTE(nathaniel): Pylint and I wil probably never agree on this for
97 # private classes. For public classes maybe?
98 too-many-instance-attributes,
99 # NOTE(nathaniel): Some of our modules have a lot of lines... of
100 # specification and documentation. Maybe if this were
101 # lines-of-code-based we would use it.
102 too-many-lines,
103 # TODO(https://github.com/grpc/grpc/issues/261): Maybe we could have
104 # this one if we extracted just a few more helper functions...
105 too-many-nested-blocks,
Mehrdad Afshari7cd4ee72018-06-08 08:16:31 -0700106 # TODO(https://github.com/grpc/grpc/issues/261): Disable unnecessary
107 # super-init requirement for abstract class implementations for now.
Mehrdad Afshariadedd432018-06-07 23:40:03 -0700108 super-init-not-called,
Mehrdad Afshari7cd4ee72018-06-08 08:16:31 -0700109 # NOTE(nathaniel): A single statement that always returns program
110 # control is better than two statements the first of which sometimes
111 # returns program control and the second of which always returns
112 # program control. Probably generally, but definitely in the cases of
113 # if:/else: and for:/else:.
114 useless-else-on-loop,
115 no-else-return,