ruff-only #1
|
@ -19,7 +19,7 @@ import sys
|
||||||
root_directory = os.path.dirname(os.getcwd())
|
root_directory = os.path.dirname(os.getcwd())
|
||||||
sys.path.insert(0, root_directory)
|
sys.path.insert(0, root_directory)
|
||||||
|
|
||||||
import sanic
|
import sanic # noqa: E402
|
||||||
|
|
||||||
|
|
||||||
# -- General configuration ------------------------------------------------
|
# -- General configuration ------------------------------------------------
|
||||||
|
|
|
@ -3,8 +3,11 @@ requires = ["setuptools", "wheel"]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
line-length = 79
|
|
||||||
extend-select = ["I"]
|
extend-select = ["I"]
|
||||||
|
ignore = ["D100", "D101", "D102", "D103", "E402", "E741", "F811", "F821"]
|
||||||
|
line-length = 79
|
||||||
|
show-source = true
|
||||||
|
show-fixes = true
|
||||||
|
|
||||||
[tool.ruff.isort]
|
[tool.ruff.isort]
|
||||||
known-first-party = ["sanic"]
|
known-first-party = ["sanic"]
|
||||||
|
|
|
@ -81,7 +81,7 @@ def _run_shell_command(command: list):
|
||||||
output, error = process.communicate()
|
output, error = process.communicate()
|
||||||
return_code = process.returncode
|
return_code = process.returncode
|
||||||
return output.decode("utf-8"), error, return_code
|
return output.decode("utf-8"), error, return_code
|
||||||
except:
|
except Exception:
|
||||||
return None, None, -1
|
return None, None, -1
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -169,7 +169,7 @@ def test_exception_handler_lookup(exception_handler_app: Sanic):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
ModuleNotFoundError
|
ModuleNotFoundError # noqa: F823
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|
||||||
class ModuleNotFoundError(ImportError):
|
class ModuleNotFoundError(ImportError):
|
||||||
|
|
|
@ -6,7 +6,7 @@ from sanic import Sanic
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import sanic_ext
|
import sanic_ext # noqa: F401
|
||||||
|
|
||||||
SANIC_EXT_IN_ENV = True
|
SANIC_EXT_IN_ENV = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user