1
0
Fork 0
mirror of synced 2024-05-06 21:32:44 +12:00

Merge pull request #938 from stared/ruff-command-fix

Fix Ruff CI errors
This commit is contained in:
Serene 2024-02-02 11:08:39 +10:00 committed by GitHub
commit 257d44408d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 5 additions and 8 deletions

View file

@ -48,7 +48,7 @@ jobs:
- name: Critical ruff lint
run: |
ruff check --format=github --select=E9,F63,F7,F82 .
ruff check --select=E9,F63,F7,F82 .
- name: Test with pytest
run: |
@ -62,4 +62,4 @@ jobs:
- name: Full ruff lint
run: |
ruff check --format=github . --exit-zero
ruff check . --exit-zero

View file

@ -15,7 +15,7 @@ repos:
name: black
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.272
rev: v0.1.13
hooks:
- id: ruff
name: ruff

View file

@ -45,7 +45,7 @@ dev = [
"black>=23.3.0",
"pre-commit>=3.0.4",
"pytest>=7.2.1",
"ruff>=0.0.272",
"ruff>=0.1.13",
"tox>=3.27.1",
]
@ -92,7 +92,6 @@ 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"
ignore = ["ANN101","B904","N818","RET505"]
line-length = 120
per-file-ignores={"tests/*"=["ANN","S101","S105","S106"], "scripts/*"=["INP","S105","S106"]}

View file

@ -41,8 +41,6 @@ def create_basic_args_for_download_runner(test_args: list[str], run_path: Path):
(
["-s", "EmpireDidNothingWrong", "-L", 3],
["-s", "r/EmpireDidNothingWrong", "-L", 3],
["-s", "r/EmpireDidNothingWrong", "-L", 3],
["-s", "EmpireDidNothingWrong", "-L", 3],
["-s", "https://www.reddit.com/r/TrollXChromosomes/", "-L", 3],
["-s", "r/TrollXChromosomes/", "-L", 3],
["-s", "TrollXChromosomes/", "-L", 3],

View file

@ -531,6 +531,6 @@ def test_name_submission(
def test_shortened_file_name_ending(
test_filename: str, test_ending: str, expected_end: str, test_formatter: FileNameFormatter
):
result = test_formatter.limit_file_name_length(test_filename, test_ending, Path("."))
result = test_formatter.limit_file_name_length(test_filename, test_ending, Path())
assert result.name.endswith(expected_end)
assert len(str(result)) <= FileNameFormatter.find_max_path_length()