From 7f14c9c855d21776d17e19759d597b12f467d39f Mon Sep 17 00:00:00 2001 From: Alexander Hess Date: Sat, 28 Nov 2026 02:44:35 +0100 Subject: [PATCH] Add `flake8-commas` --- noxfile.py | 1 + pyproject.toml | 1 + tests/db/fake_data/factories/utils.py | 5 ++++- uv.lock | 14 ++++++++++++++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index 0b0b9c2..27d0aed 100644 --- a/noxfile.py +++ b/noxfile.py @@ -186,6 +186,7 @@ def lint_code(session: Session) -> None: 'flake8-black', 'flake8-broken-line', 'flake8-bugbear', + 'flake8-commas', 'flake8-pyproject', 'flake8-pytest-style', 'isort', diff --git a/pyproject.toml b/pyproject.toml index 8f48b17..51c2435 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -95,6 +95,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-commas (>=4.0.0,<5.0.0)", "flake8-pyproject (>=1.2.4,<2.0.0)", "flake8-pytest-style (>=2.2.0,<3.0.0)", "mypy (>=2.4.1,<3.0.0)", diff --git a/tests/db/fake_data/factories/utils.py b/tests/db/fake_data/factories/utils.py index 0e85da2..9eb1f41 100644 --- a/tests/db/fake_data/factories/utils.py +++ b/tests/db/fake_data/factories/utils.py @@ -19,7 +19,10 @@ def random_timespan( total_min_seconds = min_hours * 3600 + min_minutes * 60 + min_seconds total_max_seconds = max_hours * 3600 + max_minutes * 60 + max_seconds return dt.timedelta( - seconds=random.randint(int(total_min_seconds), int(total_max_seconds)) + seconds=random.randint( + int(total_min_seconds), + int(total_max_seconds), + ), ) diff --git a/uv.lock b/uv.lock index 6751708..1a11cac 100644 --- a/uv.lock +++ b/uv.lock @@ -938,6 +938,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-commas" +version = "4.0.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "flake8" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/e4/e7/4add4247c9ea7871f6bc9f794f2771647b809bb492b36c8ce18825d64994/flake8_commas-4.0.0.tar.gz", hash = "sha256:a68834b42a9a31c94ca790efe557a932c0eae21a3479c6b9a23c4dc077e3ea96", size = 9338, upload-time = "2024-05-16T20:07:46.271Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/74/d4/75d1cdd7c89cb6af4f956393c339bb9a7d203999432a823f60b64c0ea072/flake8_commas-4.0.0-py3-none-any.whl", hash = "sha256:cad476d71ba72e8b941a8508d5b9ffb6b03e50f7102982474f085ad0d674b685", size = 7877, upload-time = "2024-05-16T20:07:44.536Z" }, +] + [[package]] name = "flake8-plugin-utils" version = "1.3.3" @@ -3592,6 +3604,7 @@ dev = [ { name = "flake8-black" }, { name = "flake8-broken-line" }, { name = "flake8-bugbear" }, + { name = "flake8-commas" }, { name = "flake8-pyproject" }, { name = "flake8-pytest-style" }, { name = "isort" }, @@ -3646,6 +3659,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-commas", specifier = ">=4.0.0,<5.0.0" }, { name = "flake8-pyproject", specifier = ">=1.2.4,<2.0.0" }, { name = "flake8-pytest-style", specifier = ">=2.2.0,<3.0.0" }, { name = "isort", specifier = ">=9.0.2,<10.0.0" },