Upgrade dev dependencies;

upgrade to newer reusable Github workflow;
rename requirements files;
add `ruff` linting rules;
add `black` config for line length 80
This commit is contained in:
2023-10-16 17:34:07 +02:00
parent acf4c06404
commit 1a293563d1
5 changed files with 53 additions and 28 deletions

View File

@ -39,18 +39,16 @@ dynamic = [
]
[project.optional-dependencies]
full = [
...
]
full = []
dev = [
"black==23.7.0",
"build==0.10.0",
"coverage[toml]==7.2.7",
"black==23.9.1",
"build==1.0.3",
"coverage[toml]==7.3.2",
"isort==5.12.0",
"mkdocs-material==9.1.18",
"mkdocstrings[python]==0.22.0",
"mypy==1.4.1",
"ruff==0.0.278",
"mkdocs-material==9.4.6",
"mkdocstrings[python]==0.23.0",
"mypy==1.5.1",
"ruff==0.0.292",
]
[project.urls]
@ -109,25 +107,44 @@ omit = [
[tool.ruff]
cache-dir = ".cache/ruff"
select = [
"F", # pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"N", # pep8-naming
"D", # pydocstyle
"C", # flake8-comprehensions
"ANN", # flake8-annotations
"S", # flake8-bandit
"FBT", # flake8-boolean-trap
"B", # flake8-bugbear
"A", # flake8-builtins
"C", # flake8-comprehensions
"PIE", # flake8-pie
"T20", # flake8-print
"RET", # flake8-return
"SIM", # flake8-simplify
"TD", # flake8-todos
"TCH", # flake8-type-checking
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"ERA", # eradicate
"PL", # pylint
"TRY", # tryceratops
"RUF", # ruff-specific
]
ignore = [
"E501", # Line too long -> handled by black
"D203", # 1 blank line required before class docstring -> D211 is better
"D212", # Multi-line docstring summary should start at the first line -> ugly, D212 is better
"D401", # First line of docstring should be in imperative mood -> no, it shouldn't
"D407", # Missing dashed underline after section -> different docstring style
"E501", # Line too long -> handled by black
"D203", # 1 blank line required before class docstring -> D211 is better
"D212", # Multi-line docstring summary should start at the first line -> ugly, D213 is better
"D401", # First line of docstring should be in imperative mood -> no, it shouldn't
"D407", # Missing dashed underline after section -> different docstring style
"ANN101", # Missing type annotation for self in method -> unnecessary
"ANN102", # Missing type annotation for cls in classmethod -> unnecessary
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed -> we'll use it sparingly
]
[tool.ruff.per-file-ignores]
"src/**/__init__.py" = [
"A001", # Variable {name} is shadowing a Python builtin
"D104", # Missing docstring in public package
"F401", # {...} imported but unused
]
@ -138,9 +155,16 @@ ignore = [
"D104", # Missing docstring in public package
]
####################
# Code formatting: #
[tool.black]
line_length = 80
###################
# Import sorting: #
[tool.isort]
profile = "black"
extra_standard_library = ["typing_extensions"]
line_length = 80