ruff-only #1

Open
leo wants to merge 17 commits from ruff-only into main
3 changed files with 6 additions and 6 deletions
Showing only changes of commit 9adb6e8ec0 - Show all commits

View File

@ -3,7 +3,7 @@ requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[tool.ruff]
extend-select = ["I"]
extend-select = ["I", "W"]
ignore = ["D100", "D101", "D102", "D103", "E402", "E741", "F811", "F821"]
line-length = 79
show-source = true

View File

@ -2211,7 +2211,7 @@ async def test_conflicting_body_methods_overload_error(app: Sanic):
with pytest.raises(
ServerError,
match="Duplicate route names detected: test_conflicting_body_methods_overload_error\.put.*",
match=r"Duplicate route names detected: test_conflicting_body_methods_overload_error\.put.*",
):
await app._startup()
@ -2273,7 +2273,7 @@ async def test_handler_overload_error(app: Sanic):
with pytest.raises(
ServerError,
match="Duplicate route names detected: test_handler_overload_error\.handler.*",
match=r"Duplicate route names detected: test_handler_overload_error\.handler.*",
):
await app._startup()

View File

@ -1129,7 +1129,7 @@ def test_route_invalid_host(app):
def test_route_with_regex_group(app):
@app.route("/path/to/<ext:file\.(txt)>")
@app.route(r"/path/to/<ext:file\.(txt)>")
async def handler(request, ext):
return text(ext)
@ -1160,7 +1160,7 @@ def test_route_with_regex_named_group_invalid(app):
def test_route_with_regex_group_ambiguous(app):
@app.route("/path/to/<ext:file(?:\.)(txt)>")
@app.route(r"/path/to/<ext:file(?:\.)(txt)>")
async def handler(request, ext):
return text(ext)
@ -1169,7 +1169,7 @@ def test_route_with_regex_group_ambiguous(app):
assert e.match(
re.escape(
"Could not compile pattern file(?:\.)(txt). Try using a named "
r"Could not compile pattern file(?:\.)(txt). Try using a named "
"group instead: '(?P<ext>your_matching_group)'"
)
)