From 4c0c7887e5ffd7023e8de4b5d4f2c9b62d9e5ee7 Mon Sep 17 00:00:00 2001 From: Alexander Hess Date: Fri, 27 Sep 2024 15:29:33 +0200 Subject: [PATCH] Allow and unify the usage of TODOs --- noxfile.py | 1 + poetry.lock | 20 +++++++++++++++++++- pyproject.toml | 3 +++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index bf01f0c..45830ce 100644 --- a/noxfile.py +++ b/noxfile.py @@ -205,6 +205,7 @@ def lint(session: nox.Session) -> None: "flake8-isort", "flake8-quotes", "flake8-string-format", + "flake8-todos", "flake8-pyproject", "flake8-pytest-style", "mypy", diff --git a/poetry.lock b/poetry.lock index 87fc215..f30fd5e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -704,6 +704,24 @@ files = [ [package.dependencies] flake8 = "*" +[[package]] +name = "flake8-todos" +version = "0.3.1" +description = "Python linter to check TODO comments for consistency and best practice." +optional = false +python-versions = ">=3.8" +files = [ + {file = "flake8_todos-0.3.1-py3-none-any.whl", hash = "sha256:0b4faca80bec49be7bf8e5dd46eec12f619e09cecac8a84a87775272300222b2"}, + {file = "flake8_todos-0.3.1.tar.gz", hash = "sha256:942101a08f831d7d9f7d864d86169f3bcfaf8b6d56a004c0280eb51725266b16"}, +] + +[package.dependencies] +flake8 = "*" +pycodestyle = "*" + +[package.extras] +dev = ["isort[pyproject]", "pytest"] + [[package]] name = "identify" version = "2.6.1" @@ -1681,4 +1699,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "e9e490a864511852844926112978e57c1421328f6231437f8f280ddfc88cecde" +content-hash = "d5e420036c32cb6043efd303ae45663287a7bda00036c94fd9497f9346fde701" diff --git a/pyproject.toml b/pyproject.toml index 95e4da8..2e4f244 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,6 +57,7 @@ flake8-eradicate = "^1.5" flake8-isort = "^6.1" flake8-quotes = "^3.4" flake8-string-format = "^0.3" +flake8-todos = "^0.3" flake8-pyproject = "^1.2" flake8-pytest-style = "^2.0" mypy = "^1.11" @@ -171,6 +172,7 @@ select = [ "PT", # flake8-pytest-style => enforce a consistent style with pytest "Q", # flake8-quotes => use double quotes everywhere (complying with black) "S", # flake8-bandit => common security issues + "T00", # flake8-todos => unify TODOs "T10", # flake8-debugger => no debugger usage # violations not covered by `ruff` below @@ -355,6 +357,7 @@ select = [ "PT", # flake8-pytest-style => enforce a consistent style with pytest "Q", # flake8-quotes => use double quotes everywhere "S", # flake8-bandit => common security issues + "TD", # flake8-todos => unify TODOs "T10", # flake8-debugger => no debugger usage # violations not covered by `flake8` above