.pylintrc 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. [BASIC]
  2. # We're ok with short funtion argument names.
  3. # [invalid-name]
  4. argument-rgx=[a-z_][a-z0-9_]*$
  5. # Allow filter and map.
  6. # [bad-builtin]
  7. bad-functions=input
  8. # We prefer docstrings, but we don't require them on all functions.
  9. # Require them only on long functions (for some value of long).
  10. # [missing-docstring]
  11. docstring-min-length=10
  12. # Allow longer methods than the default.
  13. # [invalid-name]
  14. method-rgx=[a-z_][a-z0-9_]{2,35}$
  15. # Allow module names containing a dash (but no underscore or uppercase letter).
  16. # They are whole programs, not meant to be included by another module.
  17. # [invalid-name]
  18. module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+)|[a-z][-0-9a-z]+)$
  19. # Some functions don't need docstrings.
  20. # [missing-docstring]
  21. no-docstring-rgx=(run_)main$
  22. # We're ok with short local or global variable names.
  23. # [invalid-name]
  24. variable-rgx=[a-z_][a-z0-9_]*$
  25. [DESIGN]
  26. # Allow more than the default 7 attributes.
  27. # [too-many-instance-attributes]
  28. max-attributes=15
  29. [FORMAT]
  30. # Allow longer modules than the default recommended maximum.
  31. # [too-many-lines]
  32. max-module-lines=2000
  33. [MESSAGES CONTROL]
  34. # * locally-disabled, locally-enabled: If we disable or enable a message
  35. # locally, it's by design. There's no need to clutter the Pylint output
  36. # with this information.
  37. # * logging-format-interpolation: Pylint warns about things like
  38. # ``log.info('...'.format(...))``. It insists on ``log.info('...', ...)``.
  39. # This is of minor utility (mainly a performance gain when there are
  40. # many messages that use formatting and are below the log level).
  41. # Some versions of Pylint (including 1.8, which is the version on
  42. # Ubuntu 18.04) only recognize old-style format strings using '%',
  43. # and complain about something like ``log.info('{}', foo)`` with
  44. # logging-too-many-args (Pylint supports new-style formatting if
  45. # declared globally with logging_format_style under [LOGGING] but
  46. # this requires Pylint >=2.2).
  47. # * no-else-return: Allow the perfectly reasonable idiom
  48. # if condition1:
  49. # return value1
  50. # else:
  51. # return value2
  52. # * unnecessary-pass: If we take the trouble of adding a line with "pass",
  53. # it's because we think the code is clearer that way.
  54. disable=locally-disabled,locally-enabled,logging-format-interpolation,no-else-return,unnecessary-pass
  55. [REPORTS]
  56. # Don't diplay statistics. Just the facts.
  57. reports=no
  58. [VARIABLES]
  59. # Allow unused variables if their name starts with an underscore.
  60. # [unused-argument]
  61. dummy-variables-rgx=_.*