Nathaniel Manista | e151a21 | 2017-02-24 17:47:24 +0000 | [diff] [blame] | 1 | [VARIABLES] |
Nathaniel Manista | 9104884 | 2017-06-24 21:16:53 +0000 | [diff] [blame] | 2 | |
Nathaniel Manista | e151a21 | 2017-02-24 17:47:24 +0000 | [diff] [blame] | 3 | # TODO(https://github.com/PyCQA/pylint/issues/1345): How does the inspection |
| 4 | # not include "unused_" and "ignored_" by default? |
| 5 | dummy-variables-rgx=^ignored_|^unused_ |
| 6 | |
Nathaniel Manista | db0f85b | 2017-03-03 05:41:50 +0000 | [diff] [blame] | 7 | [DESIGN] |
Nathaniel Manista | 9104884 | 2017-06-24 21:16:53 +0000 | [diff] [blame] | 8 | |
Nathaniel Manista | db0f85b | 2017-03-03 05:41:50 +0000 | [diff] [blame] | 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). |
| 12 | max-args=6 |
| 13 | |
Nathaniel Manista | 8903a19 | 2017-03-02 18:49:07 +0000 | [diff] [blame] | 14 | [MISCELLANEOUS] |
Nathaniel Manista | 9104884 | 2017-06-24 21:16:53 +0000 | [diff] [blame] | 15 | |
Nathaniel Manista | 8903a19 | 2017-03-02 18:49:07 +0000 | [diff] [blame] | 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. |
| 19 | notes=FIXME,XXX |
| 20 | |
Mehrdad Afshari | 1a967c3 | 2017-02-13 11:38:17 -0800 | [diff] [blame] | 21 | [MESSAGES CONTROL] |
| 22 | |
Nathaniel Manista | 9104884 | 2017-06-24 21:16:53 +0000 | [diff] [blame] | 23 | disable= |
| 24 | # TODO(https://github.com/PyCQA/pylint/issues/59#issuecomment-283774279): |
| 25 | # Enable cyclic-import after a 1.7-or-later pylint release that |
| 26 | # recognizes our disable=cyclic-import suppressions. |
| 27 | cyclic-import, |
| 28 | # TODO(https://github.com/grpc/grpc/issues/8622): Enable this after the |
| 29 | # Beta API is removed. |
| 30 | duplicate-code, |
| 31 | # TODO(https://github.com/grpc/grpc/issues/261): Doesn't seem to |
| 32 | # understand enum and concurrent.futures; look into this later with the |
| 33 | # latest pylint version. |
| 34 | import-error, |
| 35 | # TODO(https://github.com/grpc/grpc/issues/261): Enable this one. |
| 36 | # Should take a little configuration but not much. |
| 37 | invalid-name, |
| 38 | # TODO(https://github.com/grpc/grpc/issues/261): This doesn't seem to |
| 39 | # work for now? Try with a later pylint? |
| 40 | locally-disabled, |
Nathaniel Manista | 2010985 | 2017-07-28 01:24:52 +0000 | [diff] [blame] | 41 | # NOTE(nathaniel): What even is this? *Enabling* an inspection results |
| 42 | # in a warning? How does that encourage more analysis and coverage? |
| 43 | locally-enabled, |
Nathaniel Manista | 9104884 | 2017-06-24 21:16:53 +0000 | [diff] [blame] | 44 | # NOTE(nathaniel): We don't write doc strings for most private code |
| 45 | # elements. |
| 46 | missing-docstring, |
Nathaniel Manista | 69b7231 | 2017-07-21 03:18:11 +0000 | [diff] [blame] | 47 | # NOTE(nathaniel): In numeric comparisons it is better to have the |
| 48 | # lesser (or lesser-or-equal-to) quantity on the left when the |
| 49 | # expression is true than it is to worry about which is an identifier |
| 50 | # and which a literal value. |
| 51 | misplaced-comparison-constant, |
Nathaniel Manista | 9104884 | 2017-06-24 21:16:53 +0000 | [diff] [blame] | 52 | # NOTE(nathaniel): Our completely abstract interface classes don't have |
| 53 | # constructors. |
| 54 | no-init, |
| 55 | # TODO(https://github.com/grpc/grpc/issues/261): Doesn't yet play |
| 56 | # nicely with some of our code being implemented in Cython. Maybe in a |
| 57 | # later version? |
| 58 | no-name-in-module, |
| 59 | # TODO(https://github.com/grpc/grpc/issues/261): Suppress these where |
| 60 | # the odd shape of the authentication portion of the API forces them on |
| 61 | # us and enable everywhere else. |
| 62 | protected-access, |
| 63 | # NOTE(nathaniel): Pylint and I will probably never agree on this. |
| 64 | too-few-public-methods, |
| 65 | # NOTE(nathaniel): Pylint and I wil probably never agree on this for |
| 66 | # private classes. For public classes maybe? |
| 67 | too-many-instance-attributes, |
| 68 | # NOTE(nathaniel): Some of our modules have a lot of lines... of |
| 69 | # specification and documentation. Maybe if this were |
| 70 | # lines-of-code-based we would use it. |
| 71 | too-many-lines, |
| 72 | # TODO(https://github.com/grpc/grpc/issues/261): Maybe we could have |
| 73 | # this one if we extracted just a few more helper functions... |
| 74 | too-many-nested-blocks, |
Mehrdad Afshari | 7cd4ee7 | 2018-06-08 08:16:31 -0700 | [diff] [blame] | 75 | # TODO(https://github.com/grpc/grpc/issues/261): Disable unnecessary |
| 76 | # super-init requirement for abstract class implementations for now. |
Mehrdad Afshari | adedd43 | 2018-06-07 23:40:03 -0700 | [diff] [blame] | 77 | super-init-not-called, |
Mehrdad Afshari | 7cd4ee7 | 2018-06-08 08:16:31 -0700 | [diff] [blame] | 78 | # NOTE(nathaniel): A single statement that always returns program |
| 79 | # control is better than two statements the first of which sometimes |
| 80 | # returns program control and the second of which always returns |
| 81 | # program control. Probably generally, but definitely in the cases of |
| 82 | # if:/else: and for:/else:. |
| 83 | useless-else-on-loop, |
| 84 | no-else-return, |