Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

.pylintrc 18 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581
  1. [MASTER]
  2. # A comma-separated list of package or module names from where C extensions may
  3. # be loaded. Extensions are loading into the active Python interpreter and may
  4. # run arbitrary code.
  5. extension-pkg-whitelist=
  6. # Add files or directories to the blacklist. They should be base names, not
  7. # paths.
  8. ignore=CVS
  9. # Add files or directories matching the regex patterns to the blacklist. The
  10. # regex matches against base names, not paths.
  11. ignore-patterns=
  12. # Python code to execute, usually for sys.path manipulation such as
  13. # pygtk.require().
  14. #init-hook=
  15. # Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
  16. # number of processors available to use.
  17. jobs=1
  18. # Control the amount of potential inferred values when inferring a single
  19. # object. This can help the performance when dealing with large functions or
  20. # complex, nested conditions.
  21. limit-inference-results=100
  22. # List of plugins (as comma separated values of python modules names) to load,
  23. # usually to register additional checkers.
  24. load-plugins=pylintfileheader
  25. file-header=#!/usr/bin/env python3\n\n# Kosmorro - Compute The Next Ephemerides\n# Copyright \(C\) 2019 Jérôme Deuchnord <jerome@deuchnord.fr>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public License as\n# published by the Free Software Foundation, either version 3 of the\n# License, or \(at your option\) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n#\n# You should have received a copy of the GNU Affero General Public License\n# along with this program. If not, see <https://www.gnu.org/licenses/>.\n
  26. # Pickle collected data for later comparisons.
  27. persistent=yes
  28. # Specify a configuration file.
  29. #rcfile=
  30. # When enabled, pylint would attempt to guess common misconfiguration and emit
  31. # user-friendly hints instead of false-positive error messages.
  32. suggestion-mode=yes
  33. # Allow loading of arbitrary C extensions. Extensions are imported into the
  34. # active Python interpreter and may run arbitrary code.
  35. unsafe-load-any-extension=no
  36. [MESSAGES CONTROL]
  37. # Only show warnings with the listed confidence levels. Leave empty to show
  38. # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
  39. confidence=
  40. # Disable the message, report, category or checker with the given id(s). You
  41. # can either give multiple identifiers separated by comma (,) or put this
  42. # option multiple times (only on the command line, not in the configuration
  43. # file where it should appear only once). You can also use "--disable=all" to
  44. # disable everything first and then reenable specific checks. For example, if
  45. # you want to run only the similarities checker, you can use "--disable=all
  46. # --enable=similarities". If you want to run only the classes checker, but have
  47. # no Warning level messages displayed, use "--disable=all --enable=classes
  48. # --disable=W".
  49. disable=print-statement,
  50. parameter-unpacking,
  51. unpacking-in-except,
  52. old-raise-syntax,
  53. backtick,
  54. long-suffix,
  55. old-ne-operator,
  56. old-octal-literal,
  57. import-star-module-level,
  58. non-ascii-bytes-literal,
  59. raw-checker-failed,
  60. bad-inline-option,
  61. locally-disabled,
  62. file-ignored,
  63. suppressed-message,
  64. useless-suppression,
  65. deprecated-pragma,
  66. use-symbolic-message-instead,
  67. apply-builtin,
  68. basestring-builtin,
  69. buffer-builtin,
  70. cmp-builtin,
  71. coerce-builtin,
  72. execfile-builtin,
  73. file-builtin,
  74. long-builtin,
  75. raw_input-builtin,
  76. reduce-builtin,
  77. standarderror-builtin,
  78. unicode-builtin,
  79. xrange-builtin,
  80. coerce-method,
  81. delslice-method,
  82. getslice-method,
  83. setslice-method,
  84. no-absolute-import,
  85. old-division,
  86. dict-iter-method,
  87. dict-view-method,
  88. next-method-called,
  89. metaclass-assignment,
  90. indexing-exception,
  91. raising-string,
  92. reload-builtin,
  93. oct-method,
  94. hex-method,
  95. nonzero-method,
  96. cmp-method,
  97. input-builtin,
  98. round-builtin,
  99. intern-builtin,
  100. unichr-builtin,
  101. map-builtin-not-iterating,
  102. zip-builtin-not-iterating,
  103. range-builtin-not-iterating,
  104. filter-builtin-not-iterating,
  105. using-cmp-argument,
  106. eq-without-hash,
  107. div-method,
  108. idiv-method,
  109. rdiv-method,
  110. exception-message-attribute,
  111. invalid-str-codec,
  112. sys-max-int,
  113. bad-python3-import,
  114. deprecated-string-function,
  115. deprecated-str-translate-call,
  116. deprecated-itertools-function,
  117. deprecated-types-field,
  118. next-method-defined,
  119. dict-items-not-iterating,
  120. dict-keys-not-iterating,
  121. dict-values-not-iterating,
  122. deprecated-operator-function,
  123. deprecated-urllib-function,
  124. xreadlines-attribute,
  125. deprecated-sys-function,
  126. exception-escape,
  127. comprehension-escape,
  128. missing-docstring,
  129. too-many-locals,
  130. too-many-branches,
  131. too-few-public-methods,
  132. protected-access,
  133. unnecessary-comprehension,
  134. too-many-arguments,
  135. unsubscriptable-object,
  136. too-many-return-statements
  137. # Enable the message, report, category or checker with the given id(s). You can
  138. # either give multiple identifier separated by comma (,) or put this option
  139. # multiple time (only on the command line, not in the configuration file where
  140. # it should appear only once). See also the "--disable" option for examples.
  141. enable=c-extension-no-member
  142. [REPORTS]
  143. # Python expression which should return a note less than 10 (10 is the highest
  144. # note). You have access to the variables errors warning, statement which
  145. # respectively contain the number of errors / warnings messages and the total
  146. # number of statements analyzed. This is used by the global evaluation report
  147. # (RP0004).
  148. evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
  149. # Template used to display messages. This is a python new-style format string
  150. # used to format the message information. See doc for all details.
  151. #msg-template=
  152. # Set the output format. Available formats are text, parseable, colorized, json
  153. # and msvs (visual studio). You can also give a reporter class, e.g.
  154. # mypackage.mymodule.MyReporterClass.
  155. output-format=text
  156. # Tells whether to display a full report or only the messages.
  157. reports=no
  158. # Activate the evaluation score.
  159. score=yes
  160. [REFACTORING]
  161. # Maximum number of nested blocks for function / method body
  162. max-nested-blocks=5
  163. # Complete name of functions that never returns. When checking for
  164. # inconsistent-return-statements if a never returning function is called then
  165. # it will be considered as an explicit return statement and no message will be
  166. # printed.
  167. never-returning-functions=sys.exit
  168. [BASIC]
  169. # Naming style matching correct argument names.
  170. argument-naming-style=snake_case
  171. # Regular expression matching correct argument names. Overrides argument-
  172. # naming-style.
  173. #argument-rgx=
  174. # Naming style matching correct attribute names.
  175. attr-naming-style=snake_case
  176. # Regular expression matching correct attribute names. Overrides attr-naming-
  177. # style.
  178. #attr-rgx=
  179. # Bad variable names which should always be refused, separated by a comma.
  180. bad-names=foo,
  181. bar,
  182. baz,
  183. toto,
  184. tutu,
  185. tata
  186. # Naming style matching correct class attribute names.
  187. class-attribute-naming-style=any
  188. # Regular expression matching correct class attribute names. Overrides class-
  189. # attribute-naming-style.
  190. #class-attribute-rgx=
  191. # Naming style matching correct class names.
  192. class-naming-style=PascalCase
  193. # Regular expression matching correct class names. Overrides class-naming-
  194. # style.
  195. #class-rgx=
  196. # Naming style matching correct constant names.
  197. const-naming-style=UPPER_CASE
  198. # Regular expression matching correct constant names. Overrides const-naming-
  199. # style.
  200. #const-rgx=
  201. # Minimum line length for functions/classes that require docstrings, shorter
  202. # ones are exempt.
  203. docstring-min-length=-1
  204. # Naming style matching correct function names.
  205. function-naming-style=snake_case
  206. # Regular expression matching correct function names. Overrides function-
  207. # naming-style.
  208. #function-rgx=
  209. # Good variable names which should always be accepted, separated by a comma.
  210. good-names=i,
  211. j,
  212. k,
  213. ex,
  214. Run,
  215. _
  216. # Include a hint for the correct naming format with invalid-name.
  217. include-naming-hint=no
  218. # Naming style matching correct inline iteration names.
  219. inlinevar-naming-style=any
  220. # Regular expression matching correct inline iteration names. Overrides
  221. # inlinevar-naming-style.
  222. #inlinevar-rgx=
  223. # Naming style matching correct method names.
  224. method-naming-style=snake_case
  225. # Regular expression matching correct method names. Overrides method-naming-
  226. # style.
  227. #method-rgx=
  228. # Naming style matching correct module names.
  229. module-naming-style=snake_case
  230. # Regular expression matching correct module names. Overrides module-naming-
  231. # style.
  232. #module-rgx=
  233. # Colon-delimited sets of names that determine each other's naming style when
  234. # the name regexes allow several styles.
  235. name-group=
  236. # Regular expression which should only match function or class names that do
  237. # not require a docstring.
  238. no-docstring-rgx=^_
  239. # List of decorators that produce properties, such as abc.abstractproperty. Add
  240. # to this list to register other decorators that produce valid properties.
  241. # These decorators are taken in consideration only for invalid-name.
  242. property-classes=abc.abstractproperty
  243. # Naming style matching correct variable names.
  244. variable-naming-style=snake_case
  245. # Regular expression matching correct variable names. Overrides variable-
  246. # naming-style.
  247. #variable-rgx=
  248. [FORMAT]
  249. # Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
  250. expected-line-ending-format=
  251. # Regexp for a line that is allowed to be longer than the limit.
  252. ignore-long-lines=^\s*(# )?<?https?://\S+>?$
  253. # Number of spaces of indent required inside a hanging or continued line.
  254. indent-after-paren=4
  255. # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
  256. # tab).
  257. indent-string=' '
  258. # Maximum number of characters on a single line.
  259. max-line-length=120
  260. # Maximum number of lines in a module.
  261. max-module-lines=1000
  262. # List of optional constructs for which whitespace checking is disabled. `dict-
  263. # separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
  264. # `trailing-comma` allows a space between comma and closing bracket: (a, ).
  265. # `empty-line` allows space-only lines.
  266. no-space-check=trailing-comma,
  267. dict-separator
  268. # Allow the body of a class to be on the same line as the declaration if body
  269. # contains single statement.
  270. single-line-class-stmt=no
  271. # Allow the body of an if to be on the same line as the test if there is no
  272. # else.
  273. single-line-if-stmt=no
  274. [LOGGING]
  275. # Format style used to check logging format string. `old` means using %
  276. # formatting, while `new` is for `{}` formatting.
  277. logging-format-style=old
  278. # Logging modules to check that the string format arguments are in logging
  279. # function parameter format.
  280. logging-modules=logging
  281. [MISCELLANEOUS]
  282. # List of note tags to take in consideration, separated by a comma.
  283. notes=FIXME,
  284. XXX,
  285. TODO
  286. [SIMILARITIES]
  287. # Ignore comments when computing similarities.
  288. ignore-comments=yes
  289. # Ignore docstrings when computing similarities.
  290. ignore-docstrings=yes
  291. # Ignore imports when computing similarities.
  292. ignore-imports=no
  293. # Minimum lines number of a similarity.
  294. min-similarity-lines=4
  295. [SPELLING]
  296. # Limits count of emitted suggestions for spelling mistakes.
  297. max-spelling-suggestions=4
  298. # Spelling dictionary name. Available dictionaries: none. To make it working
  299. # install python-enchant package..
  300. spelling-dict=
  301. # List of comma separated words that should not be checked.
  302. spelling-ignore-words=
  303. # A path to a file that contains private dictionary; one word per line.
  304. spelling-private-dict-file=
  305. # Tells whether to store unknown words to indicated private dictionary in
  306. # --spelling-private-dict-file option instead of raising a message.
  307. spelling-store-unknown-words=no
  308. [STRING]
  309. # This flag controls whether the implicit-str-concat-in-sequence should
  310. # generate a warning on implicit string concatenation in sequences defined over
  311. # several lines.
  312. check-str-concat-over-line-jumps=no
  313. [TYPECHECK]
  314. # List of decorators that produce context managers, such as
  315. # contextlib.contextmanager. Add to this list to register other decorators that
  316. # produce valid context managers.
  317. contextmanager-decorators=contextlib.contextmanager
  318. # List of members which are set dynamically and missed by pylint inference
  319. # system, and so shouldn't trigger E1101 when accessed. Python regular
  320. # expressions are accepted.
  321. generated-members=
  322. # Tells whether missing members accessed in mixin class should be ignored. A
  323. # mixin class is detected if its name ends with "mixin" (case insensitive).
  324. ignore-mixin-members=yes
  325. # Tells whether to warn about missing members when the owner of the attribute
  326. # is inferred to be None.
  327. ignore-none=yes
  328. # This flag controls whether pylint should warn about no-member and similar
  329. # checks whenever an opaque object is returned when inferring. The inference
  330. # can return multiple potential results while evaluating a Python object, but
  331. # some branches might not be evaluated, which results in partial inference. In
  332. # that case, it might be useful to still emit no-member and other checks for
  333. # the rest of the inferred objects.
  334. ignore-on-opaque-inference=yes
  335. # List of class names for which member attributes should not be checked (useful
  336. # for classes with dynamically set attributes). This supports the use of
  337. # qualified names.
  338. ignored-classes=optparse.Values,thread._local,_thread._local
  339. # List of module names for which member attributes should not be checked
  340. # (useful for modules/projects where namespaces are manipulated during runtime
  341. # and thus existing member attributes cannot be deduced by static analysis. It
  342. # supports qualified module names, as well as Unix pattern matching.
  343. ignored-modules=
  344. # Show a hint with possible names when a member name was not found. The aspect
  345. # of finding the hint is based on edit distance.
  346. missing-member-hint=yes
  347. # The minimum edit distance a name should have in order to be considered a
  348. # similar match for a missing member name.
  349. missing-member-hint-distance=1
  350. # The total number of similar names that should be taken in consideration when
  351. # showing a hint for a missing member.
  352. missing-member-max-choices=1
  353. [VARIABLES]
  354. # List of additional names supposed to be defined in builtins. Remember that
  355. # you should avoid defining new builtins when possible.
  356. additional-builtins=
  357. # Tells whether unused global variables should be treated as a violation.
  358. allow-global-unused-variables=yes
  359. # List of strings which can identify a callback function by name. A callback
  360. # name must start or end with one of those strings.
  361. callbacks=cb_,
  362. _cb
  363. # A regular expression matching the name of dummy variables (i.e. expected to
  364. # not be used).
  365. dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
  366. # Argument names that match this expression will be ignored. Default to name
  367. # with leading underscore.
  368. ignored-argument-names=_.*|^ignored_|^unused_
  369. # Tells whether we should check for unused import in __init__ files.
  370. init-import=no
  371. # List of qualified module names which can have objects that can redefine
  372. # builtins.
  373. redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
  374. [CLASSES]
  375. # List of method names used to declare (i.e. assign) instance attributes.
  376. defining-attr-methods=__init__,
  377. __new__,
  378. setUp
  379. # List of member names, which should be excluded from the protected access
  380. # warning.
  381. exclude-protected=_asdict,
  382. _fields,
  383. _replace,
  384. _source,
  385. _make
  386. # List of valid names for the first argument in a class method.
  387. valid-classmethod-first-arg=cls
  388. # List of valid names for the first argument in a metaclass class method.
  389. valid-metaclass-classmethod-first-arg=cls
  390. [DESIGN]
  391. # Maximum number of arguments for function / method.
  392. max-args=5
  393. # Maximum number of attributes for a class (see R0902).
  394. max-attributes=7
  395. # Maximum number of boolean expressions in an if statement.
  396. max-bool-expr=5
  397. # Maximum number of branch for function / method body.
  398. max-branches=12
  399. # Maximum number of locals for function / method body.
  400. max-locals=15
  401. # Maximum number of parents for a class (see R0901).
  402. max-parents=7
  403. # Maximum number of public methods for a class (see R0904).
  404. max-public-methods=20
  405. # Maximum number of return / yield for function / method body.
  406. max-returns=6
  407. # Maximum number of statements in function / method body.
  408. max-statements=50
  409. # Minimum number of public methods for a class (see R0903).
  410. min-public-methods=2
  411. [IMPORTS]
  412. # Allow wildcard imports from modules that define __all__.
  413. allow-wildcard-with-all=no
  414. # Analyse import fallback blocks. This can be used to support both Python 2 and
  415. # 3 compatible code, which means that the block might have code that exists
  416. # only in one or another interpreter, leading to false positives when analysed.
  417. analyse-fallback-blocks=no
  418. # Deprecated modules which should not be used, separated by a comma.
  419. deprecated-modules=optparse,tkinter.tix
  420. # Create a graph of external dependencies in the given file (report RP0402 must
  421. # not be disabled).
  422. ext-import-graph=
  423. # Create a graph of every (i.e. internal and external) dependencies in the
  424. # given file (report RP0402 must not be disabled).
  425. import-graph=
  426. # Create a graph of internal dependencies in the given file (report RP0402 must
  427. # not be disabled).
  428. int-import-graph=
  429. # Force import order to recognize a module as part of the standard
  430. # compatibility libraries.
  431. known-standard-library=
  432. # Force import order to recognize a module as part of a third party library.
  433. known-third-party=enchant
  434. [EXCEPTIONS]
  435. # Exceptions that will emit a warning when being caught. Defaults to
  436. # "BaseException, Exception".
  437. overgeneral-exceptions=BaseException,
  438. Exception