1
0
Fork 0
mirror of synced 2024-06-10 22:34:40 +12:00

Merge pull request #875 from OMEGARAZER/RUF-lint

This commit is contained in:
Serene 2023-06-07 10:30:52 +10:00 committed by GitHub
commit 84ff85493b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 7 deletions

View file

@ -89,6 +89,7 @@ markers = [
[tool.ruff]
exclude = ["scripts/tests"]
external = ["FURB123"]
flake8-annotations = {"allow-star-arg-any" = true, "suppress-dummy-args" = true}
flake8-pytest-style = {"parametrize-values-type" = "tuple", "mark-parentheses" = false}
format = "grouped"

View file

@ -28,7 +28,8 @@ def create_basic_args_for_archive_runner(test_args: list[str], run_path: Path):
str(Path(run_path, "test_config.cfg")),
"--log",
str(Path(run_path, "test_log.txt")),
] + test_args
*test_args,
]
return out

View file

@ -27,7 +27,8 @@ def create_basic_args_for_cloner_runner(test_args: list[str], tmp_path: Path):
str(Path(tmp_path, "test_config.cfg")),
"--log",
str(Path(tmp_path, "test_log.txt")),
] + test_args
*test_args,
]
return out

View file

@ -28,7 +28,8 @@ def create_basic_args_for_download_runner(test_args: list[str], run_path: Path):
str(Path(run_path, "test_config.cfg")),
"--log",
str(Path(run_path, "test_log.txt")),
] + test_args
*test_args,
]
return out

View file

@ -427,8 +427,8 @@ def test_multilevel_folder_scheme(
("test", "test"),
("😍", "😍"),
("test😍", "test😍"),
("test😍 ", "test😍 "),
("test😍 \\u2019", "test😍 "),
("test😍 ", "test😍 "), # noqa: RUF001
("test😍 \\u2019", "test😍 "), # noqa: RUF001
("Using that real good [1\\4]", "Using that real good [1\\4]"),
),
)
@ -442,8 +442,8 @@ def test_preserve_emojis(test_name_string: str, expected: str, submission: Magic
@pytest.mark.parametrize(
("test_string", "expected"),
(
("test \\u2019", "test "),
("My cat\\u2019s paws are so cute", "My cats paws are so cute"),
("test \\u2019", "test "), # noqa: RUF001
("My cat\\u2019s paws are so cute", "My cats paws are so cute"), # noqa: RUF001
),
)
def test_convert_unicode_escapes(test_string: str, expected: str):