From ec35f5f2c81e8d1dde72ae3ef4d5413d0b7449d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=2E=20K=C3=A4rkk=C3=A4inen?= Date: Wed, 25 Oct 2023 02:03:44 +0100 Subject: [PATCH] Fix/ignore all remaining errors. --- docs/conf.py | 2 +- pyproject.toml | 5 ++++- scripts/release.py | 2 +- tests/test_exceptions_handler.py | 2 +- tests/test_ext_integration.py | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 07bfe0f9..252e4fbe 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -19,7 +19,7 @@ import sys root_directory = os.path.dirname(os.getcwd()) sys.path.insert(0, root_directory) -import sanic +import sanic # noqa: E402 # -- General configuration ------------------------------------------------ diff --git a/pyproject.toml b/pyproject.toml index 3bdbb374..4dcce264 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,8 +3,11 @@ requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" [tool.ruff] -line-length = 79 extend-select = ["I"] +ignore = ["D100", "D101", "D102", "D103", "E402", "E741", "F811", "F821"] +line-length = 79 +show-source = true +show-fixes = true [tool.ruff.isort] known-first-party = ["sanic"] diff --git a/scripts/release.py b/scripts/release.py index b9996912..547e53bf 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -81,7 +81,7 @@ def _run_shell_command(command: list): output, error = process.communicate() return_code = process.returncode return output.decode("utf-8"), error, return_code - except: + except Exception: return None, None, -1 diff --git a/tests/test_exceptions_handler.py b/tests/test_exceptions_handler.py index 7697162e..a5cb597c 100644 --- a/tests/test_exceptions_handler.py +++ b/tests/test_exceptions_handler.py @@ -169,7 +169,7 @@ def test_exception_handler_lookup(exception_handler_app: Sanic): pass try: - ModuleNotFoundError + ModuleNotFoundError # noqa: F823 except Exception: class ModuleNotFoundError(ImportError): diff --git a/tests/test_ext_integration.py b/tests/test_ext_integration.py index 4cd1a7b9..19c50807 100644 --- a/tests/test_ext_integration.py +++ b/tests/test_ext_integration.py @@ -6,7 +6,7 @@ from sanic import Sanic try: - import sanic_ext + import sanic_ext # noqa: F401 SANIC_EXT_IN_ENV = True except ImportError: