ruff-only #1
|
@ -3,7 +3,7 @@ requires = ["setuptools", "wheel"]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
extend-select = ["I"]
|
extend-select = ["I", "W"]
|
||||||
ignore = ["D100", "D101", "D102", "D103", "E402", "E741", "F811", "F821"]
|
ignore = ["D100", "D101", "D102", "D103", "E402", "E741", "F811", "F821"]
|
||||||
line-length = 79
|
line-length = 79
|
||||||
show-source = true
|
show-source = true
|
||||||
|
|
|
@ -2211,7 +2211,7 @@ async def test_conflicting_body_methods_overload_error(app: Sanic):
|
||||||
|
|
||||||
with pytest.raises(
|
with pytest.raises(
|
||||||
ServerError,
|
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()
|
await app._startup()
|
||||||
|
|
||||||
|
@ -2273,7 +2273,7 @@ async def test_handler_overload_error(app: Sanic):
|
||||||
|
|
||||||
with pytest.raises(
|
with pytest.raises(
|
||||||
ServerError,
|
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()
|
await app._startup()
|
||||||
|
|
||||||
|
|
|
@ -1129,7 +1129,7 @@ def test_route_invalid_host(app):
|
||||||
|
|
||||||
|
|
||||||
def test_route_with_regex_group(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):
|
async def handler(request, ext):
|
||||||
return text(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):
|
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):
|
async def handler(request, ext):
|
||||||
return text(ext)
|
return text(ext)
|
||||||
|
|
||||||
|
@ -1169,7 +1169,7 @@ def test_route_with_regex_group_ambiguous(app):
|
||||||
|
|
||||||
assert e.match(
|
assert e.match(
|
||||||
re.escape(
|
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)'"
|
"group instead: '(?P<ext>your_matching_group)'"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user