Imported Upstream version 1.26.0
[platform/upstream/grpc.git] / .pylintrc
1 [MASTER]
2 ignore=
3         src/python/grpcio/grpc/beta,
4         src/python/grpcio/grpc/framework,
5         src/python/grpcio/grpc/framework/common,
6         src/python/grpcio/grpc/framework/foundation,
7         src/python/grpcio/grpc/framework/interfaces,
8
9 extension-pkg-whitelist=grpc._cython.cygrpc
10
11 [VARIABLES]
12
13 # TODO(https://github.com/PyCQA/pylint/issues/1345): How does the inspection
14 # not include "unused_" and "ignored_" by default?
15 dummy-variables-rgx=^ignored_|^unused_
16
17 [DESIGN]
18
19 # NOTE(nathaniel): Not particularly attached to this value; it just seems to
20 # be what works for us at the moment (excepting the dead-code-walking Beta
21 # API).
22 max-args=7
23
24 [MISCELLANEOUS]
25
26 # NOTE(nathaniel): We are big fans of "TODO(<issue link>): " and
27 # "NOTE(<username or issue link>): ". We do not allow "TODO:",
28 # "TODO(<username>):", "FIXME:", or anything else.
29 notes=FIXME,XXX
30
31 [MESSAGES CONTROL]
32
33 disable=
34         # TODO(https://github.com/PyCQA/pylint/issues/59#issuecomment-283774279):
35         # Enable cyclic-import after a 1.7-or-later pylint release that
36         # recognizes our disable=cyclic-import suppressions.
37         cyclic-import,
38         # TODO(https://github.com/grpc/grpc/issues/8622): Enable this after the
39         # Beta API is removed.
40         duplicate-code,
41         # TODO(https://github.com/grpc/grpc/issues/261): Doesn't seem to
42         # understand enum and concurrent.futures; look into this later with the
43         # latest pylint version.
44         import-error,
45         # TODO(https://github.com/grpc/grpc/issues/261): Enable this one.
46         # Should take a little configuration but not much.
47         invalid-name,
48         # TODO(https://github.com/grpc/grpc/issues/261): This doesn't seem to
49         # work for now? Try with a later pylint?
50         locally-disabled,
51         # NOTE(nathaniel): What even is this? *Enabling* an inspection results
52         # in a warning? How does that encourage more analysis and coverage?
53         locally-enabled,
54         # NOTE(nathaniel): We don't write doc strings for most private code
55         # elements.
56         missing-docstring,
57         # NOTE(nathaniel): In numeric comparisons it is better to have the
58         # lesser (or lesser-or-equal-to) quantity on the left when the
59         # expression is true than it is to worry about which is an identifier
60         # and which a literal value.
61         misplaced-comparison-constant,
62         # NOTE(nathaniel): Our completely abstract interface classes don't have
63         # constructors.
64         no-init,
65         # TODO(https://github.com/grpc/grpc/issues/261): Doesn't yet play
66         # nicely with some of our code being implemented in Cython. Maybe in a
67         # later version?
68         no-name-in-module,
69         # TODO(https://github.com/grpc/grpc/issues/261): Suppress these where
70         # the odd shape of the authentication portion of the API forces them on
71         # us and enable everywhere else.
72         protected-access,
73         # NOTE(nathaniel): Pylint and I will probably never agree on this.
74         too-few-public-methods,
75         # NOTE(nathaniel): Pylint and I wil probably never agree on this for
76         # private classes. For public classes maybe?
77         too-many-instance-attributes,
78         # NOTE(nathaniel): Some of our modules have a lot of lines... of
79         # specification and documentation. Maybe if this were
80         # lines-of-code-based we would use it.
81         too-many-lines,
82         # TODO(https://github.com/grpc/grpc/issues/261): Maybe we could have
83         # this one if we extracted just a few more helper functions...
84         too-many-nested-blocks,
85         # TODO(https://github.com/grpc/grpc/issues/261): Disable unnecessary
86         # super-init requirement for abstract class implementations for now.
87         super-init-not-called,
88         # NOTE(nathaniel): A single statement that always returns program
89         # control is better than two statements the first of which sometimes
90         # returns program control and the second of which always returns
91         # program control. Probably generally, but definitely in the cases of
92         # if:/else: and for:/else:.
93         useless-else-on-loop,
94         no-else-return,
95         # NOTE(lidiz): Python 3 make object inheritance default, but not PY2
96         useless-object-inheritance,