various linter-related fixes
Some type annotations are still wrong
This commit is contained in:
parent
5cf4b826c7
commit
d5ed7a1298
1 changed files with 251 additions and 138 deletions
|
|
@ -36,10 +36,10 @@ classifiers = [
|
|||
"Topic :: Multimedia :: Graphics",
|
||||
"Topic :: Scientific/Engineering",
|
||||
]
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.11"
|
||||
dynamic = ["version"]
|
||||
dependencies = [
|
||||
"numpy~=1.21",
|
||||
"numpy>=1.26",
|
||||
]
|
||||
|
||||
[tool.hatch.version]
|
||||
|
|
@ -47,3 +47,45 @@ path = "adze/__init__.py"
|
|||
|
||||
[project.optional-dependencies]
|
||||
stl = ["stl"]
|
||||
|
||||
[tool.ruff]
|
||||
exclude = [
|
||||
".git",
|
||||
"dist",
|
||||
]
|
||||
line-length = 145
|
||||
indent-width = 4
|
||||
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
||||
lint.select = [
|
||||
"NPY", "E", "F", "W", "B", "ANN", "UP", "SLOT", "SIM", "LOG",
|
||||
"C4", "ISC", "PIE", "PT", "RET", "TCH", "PTH", "INT",
|
||||
"ARG", "PL", "R", "TRY",
|
||||
"G010", "G101", "G201", "G202",
|
||||
"Q002", "Q003", "Q004",
|
||||
]
|
||||
lint.ignore = [
|
||||
#"ANN001", # No annotation
|
||||
"ANN002", # *args
|
||||
"ANN003", # **kwargs
|
||||
"ANN401", # Any
|
||||
"ANN101", # self: Self
|
||||
"SIM108", # single-line if / else assignment
|
||||
"RET504", # x=y+z; return x
|
||||
"PIE790", # unnecessary pass
|
||||
"ISC003", # non-implicit string concatenation
|
||||
"C408", # dict(x=y) instead of {'x': y}
|
||||
"PLR09", # Too many xxx
|
||||
"PLR2004", # magic number
|
||||
"PLC0414", # import x as x
|
||||
"TRY003", # Long exception message
|
||||
]
|
||||
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = [
|
||||
"matplotlib",
|
||||
"mpl_toolkits",
|
||||
"mpl_toolkits.mplot3d",
|
||||
"stl",
|
||||
]
|
||||
ignore_missing_imports = true
|
||||
|
|
|
|||
Loading…
Reference in a new issue