forked from qiskit-community/qiskit-machine-learning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
79 lines (71 loc) · 2.91 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.black]
line-length = 100
target-version = ['py39', 'py310', 'py311', 'py312']
[tool.pylint.main]
extension-pkg-allow-list = [
"numpy",
"rustworkx",
]
load-plugins = ["pylint.extensions.docparams", "pylint.extensions.docstyle"]
py-version = "3.9" # update it when bumping minimum supported python version
[tool.pylint.basic]
good-names = ["a", "b", "i", "j", "k", "d", "n", "m", "ex", "v", "w", "x", "y", "z", "Run", "_", "logger", "q", "c", "r", "qr", "cr", "qc", "nd", "pi", "op", "b", "ar", "br", "p", "cp", "ax", "dt", "__unittest", "iSwapGate", "mu"]
method-rgx = "(([a-z_][a-z0-9_]{2,49})|(assert[A-Z][a-zA-Z0-9]{2,43})|(test_[_a-zA-Z0-9]{2,}))$"
variable-rgx = "[a-z_][a-z0-9_]{1,30}$"
[tool.pylint.format]
max-line-length = 105 # default 100
[tool.pylint."messages control"]
disable = [
# intentionally disabled:
"spelling", # too noisy
"fixme", # disabled as TODOs would show up as warnings
"protected-access", # disabled as we don't follow the public vs private convention strictly
"duplicate-code", # disabled as it is too verbose
"redundant-returns-doc", # for @abstractmethod, it cannot interpret "pass"
"too-many-lines", "too-many-branches", "too-many-locals", "too-many-nested-blocks", "too-many-statements",
"too-many-instance-attributes", "too-many-arguments", "too-many-public-methods", "too-few-public-methods", "too-many-ancestors",
"unnecessary-pass", # allow for methods with just "pass", for clarity
"no-else-return", # relax "elif" after a clause with a return
"docstring-first-line-empty", # relax docstring style
"import-outside-toplevel", "import-error", # overzealous with our optionals/dynamic packages
# TODO(#9614): these were added in modern Pylint. Decide if we want to enable them. If so,
# remove from here and fix the issues. Else, move it above this section and add a comment
# with the rationale
"arguments-renamed",
"broad-exception-raised",
"consider-iterating-dictionary",
"consider-using-dict-items",
"consider-using-enumerate",
"consider-using-f-string",
"modified-iterating-list",
"nested-min-max",
"no-member",
"no-name-in-module",
"no-value-for-parameter",
"non-ascii-name",
"not-context-manager",
"superfluous-parens",
"unknown-option-value",
"unexpected-keyword-arg",
"unnecessary-dict-index-lookup",
"unnecessary-direct-lambda-call",
"unnecessary-dunder-call",
"unnecessary-ellipsis",
"unnecessary-lambda-assignment",
"unnecessary-list-index-lookup",
"unspecified-encoding",
"unsupported-assignment-operation",
"use-dict-literal",
"use-list-literal",
"use-implicit-booleaness-not-comparison",
"use-maxsplit-arg",
]
enable = [
"use-symbolic-message-instead"
]
[tool.pylint.spelling]
spelling-private-dict-file = ".pylintdict"
spelling-store-unknown-words = "n"