-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
116 lines (103 loc) · 3.16 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.pylint]
master.py-version = "3.9"
reports.output-format = "colorized"
disable = [
"invalid-name",
"no-member",
"duplicate-code",
"consider-using-min-builtin",
]
[tool.pylint.messages_control]
enable = [
"useless-suppression",
]
disable = [
"too-many-positional-arguments",
]
[tool.pylint.design]
max-args = 5 # Maximum number of arguments for function / method (see R0913).
max-attributes = 7 # Maximum number of attributes for a class (see R0902).
max-branches = 12 # Maximum number of branch for function / method body (see R0912).
max-locals = 15 # Maximum number of parents for a class (see R0914).
max-parents = 7 # Maximum number of parents for a class (see R0901).
max-public-methods = 20 # Maximum number of public methods for a class (see R0904).
max-returns = 6 # Max number of return / yield for function / method body (see R0911).
max-statements = 50 # Max number of statements in function / method body (see R0915).
min-public-methods = 2 # Minimum number of public methods for a class (see R0903).
[tool.pylint.format]
max-line-length = 100 # Maximum number of characters on a single line.
max-module-lines = 1000 # Maximum number of lines in a module.
[tool.ruff]
indent-width = 4
line-length = 88
target-version = "py39"
extend-include = ["*.ipynb"]
lint.select = [
# "ANN", # flake8-annotations
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear
"C4", # flake8-comprehensions
# "C90", # mccabe
"D", # pydocstyle
# "DTZ", # flake8-datetimez
# "E", # pycodestyle
"EM", # flake8-errmsg
"ERA", # eradicate
"F", # Pyflakes
"I", # isort
"ICN", # flake8-import-conventions
"N", # pep8-naming
# "PD", # pandas-vet
"PGH", # pygrep-hooks
"PIE", # flake8-pie
# "PL", # Pylint
"PLC", # Pylint
"PLE", # Pylint
# "PLR", # Pylint
"PLW", # Pylint
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RET", # flake8-return
"RUF100", # Ruff-specific
# "S", # flake8-bandit
"SIM", # flake8-simplify
# "T20", # flake8-print
"TID", # flake8-tidy-imports
"UP", # pyupgrade
"W", # pycodestyle
"YTT", # flake8-2020
]
exclude = [
"**example-notebook-SVC.ipynb",
"**example-notebook-decisiontree.ipynb",
"**example-notebook-keras.ipynb",
"**example-notebook-randomforest.ipynb",
"**attribute_inference_cancer.ipynb",
"**instance_based_mimic.ipynb",
"**membership_inference_cancer.ipynb",
]
lint.ignore = [
"ANN101", # missing-type-self
"EM101", # raw-string-in-exception
"EM102", # f-string-in-exception
"N818", # error-suffix-on-exception-name
]
[tool.ruff.lint.pep8-naming]
extend-ignore-names = [
"X", "X_train", "X_val", "X_test", "X_predict",
"X_target_train", "X_shadow_train", "N", "C",
"X_train_orig", "X_test_orig", "X_orig", "X_transformed",
"X_encoded",
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = 80
[tool.ruff.lint.extend-per-file-ignores]
"user_stories/**/*" = ["ANN"]
"tests/**/*" = ["S101", "PLR2004", "ANN"]
"sacroml/attacks/structural_attack.py" = ["PLR2004"]