diff --git a/noxfile.py b/noxfile.py index 4870e86..e61cee3 100644 --- a/noxfile.py +++ b/noxfile.py @@ -210,6 +210,7 @@ def lint_code(session: nox.Session) -> None: "flake8-pyproject", "flake8-pytest-style", "flake8-quotes", + "flake8-raise", "flake8-return", "flake8-sfs", "flake8-simplify", diff --git a/pyproject.toml b/pyproject.toml index 4a23a27..24e1e27 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -110,6 +110,7 @@ dev = [ "flake8-pyproject (>=1.2.4,<2.0.0)", "flake8-pytest-style (>=2.2.0,<3.0.0)", "flake8-quotes (>=3.4.0,<4.0.0)", + "flake8-raise (>=0.0.5,<0.1.0)", "flake8-return (>=1.2.0,<2.0.0)", "flake8-sfs (>=1.0.1,<2.0.0)", "flake8-simplify (>=0.31.1,<0.32.0)", @@ -245,6 +246,8 @@ select = [ "PT0", # flake8-quotes => Use double quotes everywhere (complying with black) "Q0", + # flake8-raise => No parentheses for exceptions without arguments + "R1", # flake8-return => Consistent return statements "R5", # flake8-sfs => Use f-strings as the only type of string formatting @@ -559,6 +562,8 @@ select = [ "Q", # flake8-return ("R5") => Consistent return statements "RET", + # flake8-raise ("R1") => No parentheses for exceptions without arguments + "RSE", # flake8-bandit => Common security issues "S", # flake8-simplify => Simpler code diff --git a/uv.lock b/uv.lock index 5ae4aff..f87ba50 100644 --- a/uv.lock +++ b/uv.lock @@ -1117,6 +1117,18 @@ dependencies = [ ] sdist = { url = "https://files.pythonhosted.org/packages/dd/57/a173e3eb86072b7ee77650aca496b15d6886367d257f58ea9de5276e330a/flake8-quotes-3.4.0.tar.gz", hash = "sha256:aad8492fb710a2d3eabe68c5f86a1428de650c8484127e14c43d0504ba30276c", size = 14107, upload-time = "2024-02-10T21:58:22.357Z" } +[[package]] +name = "flake8-raise" +version = "0.0.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "flake8" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/45/3d/0211d7fb77b3bc6c49495575de4dd07b2ca6fc90a6784bca6097ec980cb9/flake8-raise-0.0.5.tar.gz", hash = "sha256:0a9890e16b851402d9b0d4fafe6c34890eab73835a2c2079c3850a25be575623", size = 5524, upload-time = "2020-01-26T13:53:15.354Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/da/b7/b8edb1ae5c517b8d3cd693129daab16282c5a4b4fc6ad4522cedc29eba61/flake8_raise-0.0.5-py3-none-any.whl", hash = "sha256:df26e5c542a58c8f8786d978e18ad7e54126a0ef5c6241c35dafaca7e2bbb808", size = 3694, upload-time = "2020-01-26T13:53:13.431Z" }, +] + [[package]] name = "flake8-return" version = "1.2.0" @@ -3912,6 +3924,7 @@ dev = [ { name = "flake8-pyproject" }, { name = "flake8-pytest-style" }, { name = "flake8-quotes" }, + { name = "flake8-raise" }, { name = "flake8-return" }, { name = "flake8-sfs" }, { name = "flake8-simplify" }, @@ -3988,6 +4001,7 @@ dev = [ { name = "flake8-pyproject", specifier = ">=1.2.4,<2.0.0" }, { name = "flake8-pytest-style", specifier = ">=2.2.0,<3.0.0" }, { name = "flake8-quotes", specifier = ">=3.4.0,<4.0.0" }, + { name = "flake8-raise", specifier = ">=0.0.5,<0.1.0" }, { name = "flake8-return", specifier = ">=1.2.0,<2.0.0" }, { name = "flake8-sfs", specifier = ">=1.0.1,<2.0.0" }, { name = "flake8-simplify", specifier = ">=0.31.1,<0.32.0" },