-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
269 lines (251 loc) · 7.79 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = 'tikzify'
version = '1.1.0'
description = 'Utilities for programmatically generating TikZ code.'
readme = 'README.rst'
requires-python = '>=3.10,<3.13'
license = {file = 'LICENSE'}
authors = [{email = '[email protected]'}, {name = 'Neil Girdhar'}]
maintainers = [{email = '[email protected]'}, {name = 'Neil Girdhar'}]
classifiers = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: Scientific/Engineering :: Visualization',
'Topic :: Software Development :: Libraries :: Python Modules',
'License :: OSI Approved :: MIT License',
]
dependencies = [
'more_itertools >= 8',
'networkx >= 2.5',
'numpy >= 1.21',
'scipy >= 1.9',
]
[project.urls]
repository = 'https://github.com/NeilGirdhar/tikzify'
[tool.uv]
dev-dependencies = [
'isort >= 5.8',
'jupyter >= 1',
'mypy >= 1.0',
'pylint >= 2.8',
'pyright >= 0.0.13',
'ruff >= 0.2',
]
[tool.isort]
line_length = 100
multi_line_output = 0
skip_glob = ['.pytype/*.py']
[tool.pytest]
[tool.pylint.master]
jobs = 0
py-version = '3.10'
load-plugins = [
'pylint.extensions.bad_builtin',
'pylint.extensions.broad_try_clause',
'pylint.extensions.check_elif',
'pylint.extensions.code_style',
'pylint.extensions.comparison_placement',
'pylint.extensions.confusing_elif',
'pylint.extensions.consider_refactoring_into_while_condition',
'pylint.extensions.consider_ternary_expression',
'pylint.extensions.dict_init_mutate',
'pylint.extensions.docparams',
'pylint.extensions.docstyle',
'pylint.extensions.dunder',
'pylint.extensions.empty_comment',
'pylint.extensions.eq_without_hash',
'pylint.extensions.for_any_all',
'pylint.extensions.magic_value',
'pylint.extensions.mccabe',
'pylint.extensions.no_self_use',
'pylint.extensions.overlapping_exceptions',
'pylint.extensions.private_import',
'pylint.extensions.redefined_loop_name',
'pylint.extensions.redefined_variable_type',
'pylint.extensions.set_membership',
'pylint.extensions.typing',
'pylint.extensions.while_used',
]
[tool.pylint.messages_control]
disable = [
'abstract-method',
'arguments-differ',
'bad-dunder-name',
'confusing-consecutive-elif',
'consider-using-assignment-expr',
'consider-using-tuple',
'cyclic-import',
'duplicate-code',
'empty-comment',
'fixme',
'import-outside-toplevel',
'invalid-field-call',
'invalid-name',
'invalid-unary-operand-type',
'line-too-long',
'keyword-arg-before-vararg',
'magic-value-comparison',
'missing-docstring',
'no-member',
'no-self-use',
'not-callable',
'protected-access',
'redefined-builtin',
'redefined-outer-name',
'redefined-variable-type',
'signature-differs',
'too-complex',
'too-few-public-methods',
'too-many-ancestors',
'too-many-arguments',
'too-many-branches',
'too-many-instance-attributes',
'too-many-locals',
'too-many-positional-arguments',
'too-many-return-statements',
'too-many-statements',
'too-many-try-statements',
'unexpected-keyword-arg',
'unused-argument',
'unused-import',
'use-set-for-membership',
'while-used',
]
enable = [
'useless-suppression',
'use-symbolic-message-instead',
]
[tool.pylint.reports]
output-format = 'colorized'
[tool.pylint.similarities]
min-similarity-lines = 20
ignore-imports = 'yes'
[tool.pyright]
include = ['tikzify', 'examples']
stubPath = ''
venvPath = '.'
venv = '.venv'
enableTypeIgnoreComments = false
reportImportCycles = false
reportCallInDefaultInitializer = true
reportConstantRedefinition = true
reportDeprecated = true
reportDuplicateImport = true
reportImplicitOverride = true
reportImplicitStringConcatenation = false
reportIncompatibleMethodOverride = true
reportIncompatibleVariableOverride = true
reportInconsistentConstructor = true
reportMatchNotExhaustive = true
reportMissingParameterType = true
reportMissingSuperCall = true
reportMissingTypeArgument = true
reportOverlappingOverload = true
reportPrivateImportUsage = true
reportPropertyTypeMismatch = true
reportShadowedImports = true
reportUninitializedInstanceVariable = true
reportUnknownArgumentType = false
reportUnknownLambdaType = false
reportUnknownMemberType = false
reportUnknownParameterType = false
reportUnknownVariableType = false
reportUnnecessaryCast = true
reportUnnecessaryComparison = true
reportUnnecessaryContains = true
reportUnnecessaryIsInstance = true
reportUnnecessaryTypeIgnoreComment = true
reportUntypedBaseClass = true
reportUntypedClassDecorator = true
reportUntypedFunctionDecorator = true
reportUntypedNamedTuple = true
reportUnusedCallResult = false
reportUnusedClass = true
reportUnusedExpression = true
reportUnusedFunction = true
reportUnusedVariable = true
[tool.mypy]
files = ['tikzify', 'examples']
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
no_implicit_optional = true
pretty = true
show_error_codes = true
show_error_context = false
strict_equality = true
warn_no_return = true
warn_redundant_casts = true
# warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
module = ['more_itertools', 'networkx', 'scipy.signal']
ignore_missing_imports = true
[tool.ruff]
extend-exclude = ['__init__.py']
line-length = 100
[tool.ruff.lint]
preview = true
select = ['ALL']
ignore = [
'ANN401', # Dynamically typed expressions (Any).
'ARG001', # Unused function argument.
'ARG002', # Unused method argument.
'ARG003', # Unused class method argument.
'ARG004', # Unused static method argument.
'B011', # Do not assert false.
'C901', # Complex structure.
'COM812', # Trailing comma missing.
'CPY001', # Missing copyright.
'D100', # Missing docstring in public module.
'D101', # Missing docstring in public class.
'D102', # Missing docstring in public method.
'D103', # Missing docstring in public function.
'D105', # Missing docstring in magic method.
'D107', # Missing docstring in __init__.
'DOC201', # return is not documented in docstring.
'DOC202', # Docstring should not have a returns section because the function doesn't return anything.
'DOC501', # Raised exception `ValueError` missing from docstring.
'ERA001', # Commented-out code.
'FBT003', # Boolean positional value in function call.
'FIX002', # Line contains TODO, consider resolving the issue.
'G004', # Logging statement uses f-string.
'I001', # Import block is un-sorted or un-formatted.
'PD008', # Use .loc instead of .at. If speed is important, use NumPy.
'PGH003', # Use specific rule codes when ignoring type issues.
'PLR0913', # Too many arguments in function definition.
'PLR6301', # Method doesn't use self.
'PT013', # Found incorrect import of pytest, use simple import pytest instead.
'Q000', # Single quotes found but double quotes preferred.
'RUF021', # Parenthesize `a and b` expressions when chaining `and` and `or` together...
'S101', # Assert used.
'TC001', # Move application import into a type-checking block.
'TC002', # Move third-party import into a type-checking block.
'TC003', # Move standard library import into a type-checking block.
'TD002', # Missing author in TODO; try: # TODO(<author_name>): ....
'TD003', # Missing issue link on the line following this TODO.
'TID252', # Relative imports from parent modules are banned.
]
[tool.ruff.lint.flake8-errmsg]
max-string-length = 40
[tool.ruff.lint.isort]
combine-as-imports = true
[tool.ruff.lint.pydocstyle]
# Use Google-style docstrings.
convention = 'google'
[tool.ruff.lint.pylint]
max-args = 8