Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Ruff CI errors #938

Merged
merged 3 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -62,4 +62,4 @@ jobs:

- name: Full ruff lint
run: |
ruff check --format=github . --exit-zero
ruff check . --exit-zero
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]

Expand Down Expand Up @@ -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"]}
Expand Down
2 changes: 0 additions & 2 deletions tests/integration_tests/test_download_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
2 changes: 1 addition & 1 deletion tests/test_file_name_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Loading