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