.pylintrc 3.7 KB

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