Enable more lint rules #10

Merged
alexander merged 31 commits from more-lint-rules into develop 2026-11-30 23:59:09 +01:00
4 changed files with 23 additions and 1 deletions
Showing only changes of commit f266adad45 - Show all commits

Enable A in flake8 and ruff

Alexander Hess 2026-11-30 21:40:43 +01:00
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -5,7 +5,7 @@ import velofy
project = velofy.__pkg_name__
author = velofy.__author__
copyright = f"2020, {author}"
project_copyright = f"2020, {author}"
version = release = velofy.__version__
extensions = [

View file

@ -196,6 +196,7 @@ def lint_code(session: nox.Session) -> None:
"flake8-black",
"flake8-broken-line",
"flake8-bugbear",
"flake8-builtins",
"flake8-commas",
"flake8-comprehensions",
"flake8-debugger",

View file

@ -96,6 +96,7 @@ dev = [
"flake8-black (>=0.5.0,<0.6.0)",
"flake8-broken-line (>=1.0.0,<2.0.0)",
"flake8-bugbear (>=26.11.22,<27.0.0)",
"flake8-builtins (>=3.2.0,<4.0.0)",
"flake8-commas (>=4.0.0,<5.0.0)",
"flake8-comprehensions (>=3.17.0,<4.0.0)",
"flake8-debugger (>=4.1.2,<5.0.0)",
@ -212,6 +213,8 @@ select = [
"N400",
# flake8-bugbear => opinionated bugs and design flaws
"B0", "B3", "B9",
# flake8-builtins => No shadowing of builtins
"A0",
# flake8-commas => better comma placements
"C8",
# flake8-comprehensions => better comprehensions
@ -260,6 +263,8 @@ ignore = []
# If --ignore is passed on the command
# line, still ignore the following:
extend-ignore = [
# `ruff`'s A003 does this better, as it only flags actual shadowing
"A003",
# Too long line => duplicate with E501.
"B950",
# PEP 257 documents the arguments of `__init__()` in its own docstring.
@ -472,6 +477,8 @@ select = [
# ===================================
# Violations also covered by `flake8`
# ===================================
# flake8-builtins => No shadowing of builtins
"A",
# flake8-annotations => enforce type checking for functions
"ANN0", "ANN2",
# flake8-unused-arguments ("U100") => declared function arguments must be used

14
uv.lock generated
View file

@ -947,6 +947,18 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/46/ba/da7d4108baed185aecfc0c8cc8e64b2964f92a1897d3310b79c168ac94d3/flake8_bugbear-26.11.22-py3-none-any.whl", hash = "sha256:bc10d62be1dc512dc7825ee34c20492425370b209e47fb09a1dedd29eba49aca", size = 65763, upload-time = "2026-11-22T14:25:51.217Z" },
]
[[package]]
name = "flake8-builtins"
version = "3.2.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "flake8" },
]
sdist = { url = "https://files.pythonhosted.org/packages/7c/b9/2e42d77e5afe26439eba3df47c9764a4db2d88595531dea587afc3f9b823/flake8_builtins-3.2.0.tar.gz", hash = "sha256:f0c4cee9028711349b7bf18e9a04282a613fd426e56af00bcd0c3bb61ae25481", size = 18444, upload-time = "2026-11-01T10:24:32.991Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/b6/02/c7614f54d3fde51b8a20d91e14b012a01c78c2a481d36b5e8e40535a3d0b/flake8_builtins-3.2.0-py3-none-any.whl", hash = "sha256:192a00630f183b8e7b881e98def18aa20124581dde3a3e7be7a01a6effe3504b", size = 18757, upload-time = "2026-11-01T10:24:31.47Z" },
]
[[package]]
name = "flake8-commas"
version = "4.0.0"
@ -3816,6 +3828,7 @@ dev = [
{ name = "flake8-black" },
{ name = "flake8-broken-line" },
{ name = "flake8-bugbear" },
{ name = "flake8-builtins" },
{ name = "flake8-commas" },
{ name = "flake8-comprehensions" },
{ name = "flake8-debugger" },
@ -3885,6 +3898,7 @@ dev = [
{ name = "flake8-black", specifier = ">=0.5.0,<0.6.0" },
{ name = "flake8-broken-line", specifier = ">=1.0.0,<2.0.0" },
{ name = "flake8-bugbear", specifier = ">=26.11.22,<27.0.0" },
{ name = "flake8-builtins", specifier = ">=3.2.0,<4.0.0" },
{ name = "flake8-commas", specifier = ">=4.0.0,<5.0.0" },
{ name = "flake8-comprehensions", specifier = ">=3.17.0,<4.0.0" },
{ name = "flake8-debugger", specifier = ">=4.1.2,<5.0.0" },