pylintrc.txt 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. # This is a configuration file for pylint.
  2. # (C) 2011-2013 by the GRASS Development Team
  3. # This program is free software under the GNU General Public License
  4. # (>=v2). Read the file COPYING that comes with GRASS for details.
  5. # author: Vaclav Petras <wenzeslaus gmail.com>
  6. # This configuration should work for all Python library, Python scripts and
  7. # wxPython GUI.
  8. # Example for gui/wxpython:
  9. # pylint --rcfile=../../tools/pylintrc.txt -f parseable -r n -i y lmgr/
  10. # A lot of errors need to be ignored now to avoid a large number of messages.
  11. # Files need to be fixed one by one (partialy without this configuration).
  12. # Save this file ~/.pylintrc on Linux
  13. [MASTER]
  14. # Specify a configuration file.
  15. #rcfile=
  16. # Python code to execute, usually for sys.path manipulation such as
  17. # pygtk.require().
  18. #init-hook=
  19. # Profiled execution.
  20. profile=no
  21. # Add files or directories to the blacklist. They should be base names, not
  22. # paths.
  23. ignore=CVS
  24. # Pickle collected data for later comparisons.
  25. persistent=no
  26. # List of plugins (as comma separated values of python modules names) to load,
  27. # usually to register additional checkers.
  28. load-plugins=
  29. [MESSAGES CONTROL]
  30. # Enable the message, report, category or checker with the given id(s). You can
  31. # either give multiple identifier separated by comma (,) or put this option
  32. # multiple time.
  33. #enable=
  34. # Disable the message, report, category or checker with the given id(s). You
  35. # can either give multiple identifier separated by comma (,) or put this option
  36. # multiple time (only on the command line, not in the configuration file where
  37. # it should appear only once).
  38. disable=E1103,W0141,W0201,W0311,W0312,W0612,W0613,W0614,W0622,R0201,R0901,R0904,C0103,C0111,C0322,C0323,C0324,F0401
  39. # E1103: caused probably by wxPython
  40. # W0613: unused arg -> solve somewhere here using event
  41. # C0103: names not defined
  42. # W0201: define methods used for init
  43. # W0622: Redefining built-in %r: needs complex solution
  44. # E1101: %s %r has no %r member: why?
  45. # R0201: can be solved
  46. # F0401: somthing is possible to import only in grass
  47. [REPORTS]
  48. # Set the output format. Available formats are text, parseable, colorized, msvs
  49. # (visual studio) and html
  50. output-format=text
  51. # Include message's id in output
  52. include-ids=no
  53. # Put messages in a separate file for each module / package specified on the
  54. # command line instead of printing them on stdout. Reports (if any) will be
  55. # written in a file name "pylint_global.[txt|html]".
  56. files-output=no
  57. # Tells whether to display a full report or only the messages
  58. reports=yes
  59. # Python expression which should return a note less than 10 (10 is the highest
  60. # note). You have access to the variables errors warning, statement which
  61. # respectively contain the number of errors / warnings messages and the total
  62. # number of statements analyzed. This is used by the global evaluation report
  63. # (RP0004).
  64. evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
  65. # Add a comment according to your evaluation note. This is used by the global
  66. # evaluation report (RP0004).
  67. comment=no
  68. [VARIABLES]
  69. # Tells whether we should check for unused import in __init__ files.
  70. init-import=yes
  71. # A regular expression matching the beginning of the name of dummy variables
  72. # (i.e. not used).
  73. dummy-variables-rgx=dummy|unused
  74. # List of additional names supposed to be defined in builtins. Remember that
  75. # you should avoid to define new builtins when possible.
  76. additional-builtins=_
  77. [BASIC]
  78. # Required attributes for module, separated by a comma
  79. required-attributes=
  80. # List of builtins function names that should not be used, separated by a comma
  81. bad-functions=map,filter,apply,input
  82. # Regular expression which should only match correct module names
  83. module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
  84. # Regular expression which should only match correct module level names
  85. const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
  86. # Regular expression which should only match correct class names
  87. class-rgx=[A-Z_][a-zA-Z0-9]+$
  88. # Regular expression which should only match correct function names
  89. function-rgx=[a-z_][a-zA-Z0-9_]{2,30}$
  90. # Regular expression which should only match correct method names
  91. method-rgx=[a-zA-Z_][a-zA-Z0-9_]{2,30}$
  92. # Regular expression which should only match correct instance attribute names
  93. attr-rgx=[a-z_][a-zA-Z0-9_]{2,30}$
  94. # Regular expression which should only match correct argument names
  95. argument-rgx=[a-z_][a-zA-Z0-9_]{2,30}$
  96. # Regular expression which should only match correct variable names
  97. variable-rgx=[a-z_][a-zA-Z0-9_]{2,30}$|[a-z]
  98. # Regular expression which should only match correct list comprehension /
  99. # generator expression variable names
  100. inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
  101. # Good variable names which should always be accepted, separated by a comma
  102. good-names=i,j,_,x,y,z,N,E,S,W,id
  103. # Bad variable names which should always be refused, separated by a comma
  104. bad-names=foo,bar,baz,toto,tutu,tata
  105. # Regular expression which should only match functions or classes name which do
  106. # not require a docstring
  107. no-docstring-rgx=__.*__
  108. [MISCELLANEOUS]
  109. # List of note tags to take in consideration, separated by a comma.
  110. notes=FIXME,TODO,\\todo,@todo
  111. # general regexp for convention, warning etc. would be great
  112. [TYPECHECK]
  113. # Tells whether missing members accessed in mixin class should be ignored. A
  114. # mixin class is detected if its name ends with "mixin" (case insensitive).
  115. ignore-mixin-members=yes
  116. # List of classes names for which member attributes should not be checked
  117. # (useful for classes with attributes dynamically set).
  118. ignored-classes=SQLObject
  119. # When zope mode is activated, add a predefined set of Zope acquired attributes
  120. # to generated-members.
  121. zope=no
  122. # List of members which are set dynamically and missed by pylint inference
  123. # system, and so shouldn't trigger E0201 when accessed. Python regular
  124. # expressions are accepted.
  125. generated-members=REQUEST,acl_users,aq_parent
  126. [FORMAT]
  127. # Maximum number of characters on a single line.
  128. # Increased form 80.
  129. max-line-length=150
  130. # Maximum number of lines in a module
  131. # Increased from 1000.
  132. max-module-lines=2000
  133. # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
  134. # tab).
  135. indent-string=' '
  136. [SIMILARITIES]
  137. # Minimum lines number of a similarity.
  138. min-similarity-lines=4
  139. # Ignore comments when computing similarities.
  140. ignore-comments=yes
  141. # Ignore docstrings when computing similarities.
  142. ignore-docstrings=yes
  143. [DESIGN]
  144. # Maximum number of arguments for function / method
  145. # Increased from 5.
  146. max-args=10
  147. # Argument names that match this expression will be ignored. Default to name
  148. # with leading underscore
  149. ignored-argument-names=_.*|event
  150. # Maximum number of locals for function / method body
  151. # Changed from 15.
  152. max-locals=20
  153. # Maximum number of return / yield for function / method body
  154. max-returns=6
  155. # Maximum number of branch for function / method body
  156. # Changed from 12.
  157. max-branchs=20
  158. # Maximum number of statements in function / method body
  159. max-statements=50
  160. # Maximum number of parents for a class (see R0901).
  161. max-parents=7
  162. # Maximum number of attributes for a class (see R0902).
  163. # Changed from 7.
  164. max-attributes=10
  165. # Minimum number of public methods for a class (see R0903).
  166. min-public-methods=2
  167. # Maximum number of public methods for a class (see R0904).
  168. # Increased from 20
  169. max-public-methods=30
  170. [IMPORTS]
  171. # Deprecated modules which should not be used, separated by a comma
  172. deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
  173. # Create a graph of every (i.e. internal and external) dependencies in the
  174. # given file (report RP0402 must not be disabled)
  175. import-graph=
  176. # Create a graph of external dependencies in the given file (report RP0402 must
  177. # not be disabled)
  178. ext-import-graph=
  179. # Create a graph of internal dependencies in the given file (report RP0402 must
  180. # not be disabled)
  181. int-import-graph=
  182. [CLASSES]
  183. # List of interface methods to ignore, separated by a comma. This is used for
  184. # instance to not check methods defines in Zope's Interface base class.
  185. ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
  186. # List of method names used to declare (i.e. assign) instance attributes.
  187. defining-attr-methods=__init__,__new__,setUp
  188. # List of valid names for the first argument in a class method.
  189. valid-classmethod-first-arg=cls
  190. [EXCEPTIONS]
  191. # Exceptions that will emit a warning when being caught. Defaults to
  192. # "Exception"
  193. overgeneral-exceptions=Exception