1
0
Fork 0
forked from github/pelican

More ruff fixes in files: stop ignoring C408, UP007, PLR5501, B006

This commit is contained in:
boxydog 2024-05-30 13:21:12 -05:00
commit 7577dd7603
16 changed files with 72 additions and 82 deletions

View file

@ -922,14 +922,14 @@ class TestSanitisedJoin(unittest.TestCase):
def test_detect_parent_breakout(self):
with self.assertRaisesRegex(
RuntimeError,
"Attempted to break out of output directory to " "(.*?:)?/foo/test",
"Attempted to break out of output directory to (.*?:)?/foo/test",
): # (.*?:)? accounts for Windows root
utils.sanitised_join("/foo/bar", "../test")
def test_detect_root_breakout(self):
with self.assertRaisesRegex(
RuntimeError,
"Attempted to break out of output directory to " "(.*?:)?/test",
"Attempted to break out of output directory to (.*?:)?/test",
): # (.*?:)? accounts for Windows root
utils.sanitised_join("/foo/bar", "/test")