[ruff] Add ruff's check and autofix existing issues

This commit is contained in:
Pierre Sassoulas
2024-02-02 14:49:15 +01:00
parent bdfc5c80d8
commit 514376fe29
19 changed files with 39 additions and 36 deletions

View File

@@ -3086,7 +3086,7 @@ class TestFixtureMarker:
def test_other():
pass
""" # noqa: UP031 (python syntax issues)
% {"scope": scope} # noqa: UP031 (python syntax issues)
% {"scope": scope}
)
reprec = pytester.inline_run("-lvs")
reprec.assertoutcome(passed=3)

View File

@@ -147,7 +147,7 @@ class TestRaises:
try:
pytest.raises(ValueError, int, "0")
except pytest.fail.Exception as e:
assert e.msg == f"DID NOT RAISE {repr(ValueError)}"
assert e.msg == f"DID NOT RAISE {ValueError!r}"
else:
assert False, "Expected pytest.raises.Exception"
@@ -155,7 +155,7 @@ class TestRaises:
with pytest.raises(ValueError):
pass
except pytest.fail.Exception as e:
assert e.msg == f"DID NOT RAISE {repr(ValueError)}"
assert e.msg == f"DID NOT RAISE {ValueError!r}"
else:
assert False, "Expected pytest.raises.Exception"