Add ruff settings to pyproject
This commit is contained in:
@@ -27,3 +27,43 @@ where = ["src"]
|
||||
|
||||
[project.scripts]
|
||||
emulsion = "emulsion.main:main"
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 80
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = [
|
||||
"B",
|
||||
"W",
|
||||
# "ANN",
|
||||
"FIX",
|
||||
"S",
|
||||
"F", # Pyflakes rules
|
||||
"W", # PyCodeStyle warnings
|
||||
"E", # PyCodeStyle errors
|
||||
"I", # Sort imports "properly"
|
||||
"UP", # Warn if certain things can changed due to newer Python versions
|
||||
"C4", # Catch incorrect use of comprehensions, dict, list, etc
|
||||
"FA", # Enforce from __future__ import annotations
|
||||
"ISC", # Good use of string concatenation
|
||||
"ICN", # Use common import conventions
|
||||
"RET", # Good return practices
|
||||
"SIM", # Common simplification rules
|
||||
"TID", # Some good import practices
|
||||
"TC", # Enforce importing certain types in a TYPE_CHECKING block
|
||||
# "PTH", # Use pathlib instead of os.path
|
||||
"NPY", # Some numpy-specific things
|
||||
]
|
||||
|
||||
ignore = [
|
||||
"W191",
|
||||
"E101", # allow spaces for alignment
|
||||
]
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"__init__.py" = ["E402"]
|
||||
"**/{tests,docs,tools}/*" = ["E402"]
|
||||
|
||||
[tool.ruff.format]
|
||||
quote-style = "single"
|
||||
indent-style = "tab"
|
||||
|
||||
Reference in New Issue
Block a user