-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpyproject.toml
152 lines (145 loc) · 6.23 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
[project]
name = "prusa.connect.sdk.printer"
description = "Python printer library for PrusaConnect"
readme = "README.rst"
license = {text = "Freeware"}
authors = [
{name = "Prusa Link Developers", email = "[email protected]"},
]
maintainers = [
{name = "Ondřej Tůma", email = "[email protected]"},
{name = "Michal Zoubek", email = "[email protected]"},
{name = "Tomáš Jozífek", email = "[email protected]"}
]
requires-python = ">=3.9"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Natural Language :: English",
"License :: Freeware",
"Operating System :: POSIX",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dynamic = [
"version",
"dependencies",
]
[project.urls]
"Repository" = "https://github.com/prusa3d/Prusa-Connect-SDK-Printer"
"Bug Tracker" = "https://github.com/prusa3d/Prusa-Connect-SDK-Printer/issues"
[tool.setuptools]
packages = ["prusa.connect.printer"]
[tool.setuptools.package-data]
"prusa.connect.printer" = ["py.typed"]
[tool.ruff]
lint.select = [
"F", # pyflakes
"E", # pycodestyle
"W", # pycodestyle
"C90", # mccabe
"I", # isort
"N", # pep8-naming
# "D", # pydocstyle
# "UP", # pyupgrade
"YTT", # flake8-2020
# "ANN", # flake8-annotations
"S", # flake8-bandit
"BLE", # flake8-blind-except
# "FBT", # flake8-boolean-trap
"B", # flake8-bugbear
"A", # flake8-builtins
"COM", # flake8-commas
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
"DJ", # flake8-django
# "EM", # flake8-errmsg
"EXE", # flake8-executable
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"INP", # flake8-no-pep420
"PIE", # flake8-pie
"T20", # flake8-print
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SLF", # flake8-self
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"TCH", # flake8-type-checking
"INT", # flake8-gettext
"ARG", # flake8-unused-arguments
# "PTH", # flake8-use-pathlib
"ERA", # eradicate
"PD", # pandas-vet
"PGH", # pygrep-hooks
"PL", # Pylint
"TRY", # tryceratops
"FLY", # flynt
"NPY", # NumPy-specific rules
"RUF", # Ruff-specific rules
]
lint.ignore = [
"S101", # Use of `assert` detected
"S105", # Possible hardcoded password assigned to: "TOKEN"
"Q000", # Single quotes found but double quotes preferred
"ARG001", # Unused function argument: `gcode`
"SIM105", # Use `...` instead of `try`-`except`-`pass`
"PGH003", # Use specific rule codes when ignoring type issues
"PLR2004", # Magic value used in comparison
"T201", # `print` found
"RUF100", # Unused `noqa` directive (unused: `E501`)
"A001", # Variable `dir` is shadowing a Python builtin
"SIM115", # Use context handler for opening files,
"C408", # Unnecessary `dict` call (rewrite as a literal)
"PT022", # No teardown in fixture `...`, use `return` instead of `yield`
"PT001", # Use `@pytest.fixture()` over `@pytest.fixture`
"PT011", # `pytest.raises(ValueError)` is too broad, set the `match` parameter or use a more specific exception
"PT012", # `pytest.raises()` block should contain a single simple statement
"SIM117", # Use a single `with` statement with multiple contexts instead of nested `with` statements
"S108", # Probable insecure usage of temporary file or directory: "/tmp/c"
"ARG002", # Unused method argument
"N802", # Function name should be lowercase
"SIM201", # Use ` != ` instead of `not ==`
"PT015", # Assertion always fails, replace with `pytest.fail()`
"SLF001", # Private member accessed: `_running_loop`
"PT004", # Fixture `gcode` does not return anything, add leading underscore
"ISC003", # Explicitly concatenated string should be implicitly concatenated
"PLR0915", # Too many statements (63 > 50)
"ARG005", # Unused lambda argument
"TRY003", # Avoid specifying long messages outside the exception class
"ERA001", # Found commented-out code
"RET504", # Unnecessary variable assignment before `return` statement
"PLR0913", # Too many arguments to function call
"RET501", # Do not explicitly `return None` in function if it is the only possible return value
"C402", # Unnecessary generator (rewrite as a `dict` comprehension)
"PGH004", # Use specific rule codes when using `noqa`
"ISC002", # Implicitly concatenated string literals over multiple lines
"TRY300", # Consider moving this statement to an `else` block
"TRY301", # Abstract `raise` to an inner function
"TRY400", # `logging.exception` instead of `logging.error
"N818", # Exception name `UnknownGcodeFileType` should be named with an Error suffix
"B905", # `zip()` without an explicit `strict=` parameter
"SIM108", # Use ternary operator
"FLY002", # Consider `f'{ROOT}/{abs_path}'` instead of string join
"SIM102", # Use a single `if` statement instead of nested `if` statements
"BLE001", # Do not catch blind exception: `Exception`
"PLR5501", # Consider using `elif` instead of `else` then `if` to remove one indentation level
"RSE102", # Unnecessary parentheses on raised exception
"A003", # Class attribute `hash` is shadowing a Python builtin
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"ISC001", # Implicitly concatenated string literals on one line
"SIM110", # Use `return all(successor for successor in self)` instead of `for` loop
"S110", # `try`-`except`-`pass` detected, consider logging the exception
"C413", # Unnecessary `list` call around `sorted()`
"SIM114", # Combine `if` branches using logical `or` operator
"C417", # Unnecessary `map` usage (rewrite using a `set` comprehension
"C901", # `loop_step` is too complex
"PLR0912", # Too many branches
]
[mypy]
namespace_packages = true