Skip to content

Commit

Permalink
Update ruff and lint changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bpepple committed Nov 29, 2024
1 parent 99797e9 commit ab937dc
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ repos:
- id: ruff
- id: ruff-format
repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.2
rev: v0.8.1
2 changes: 1 addition & 1 deletion darkseid/comicinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from __future__ import annotations

import re
import xml.etree.ElementTree as ET # noqa: N817
import xml.etree.ElementTree as ET
from datetime import date
from typing import Any, ClassVar, cast

Expand Down
2 changes: 1 addition & 1 deletion darkseid/metroninfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from __future__ import annotations

import xml.etree.ElementTree as ET # noqa: N817
import xml.etree.ElementTree as ET
from datetime import date, datetime, timezone
from decimal import Decimal
from pathlib import Path
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pytest-mock = "^3.14.0"
codespell = "^2.1.0"
pyright = "^1.1.232"
radon = { version = "^6.0.1", extras = ["toml"] }
ruff = "^0.4.9"
ruff = "^0.8.1"
types-python-dateutil = "^2.8.19"
vulture = "^2.3"
lxml = "^5.1.0"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_archiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from darkseid.archivers.archiver import Archiver


@pytest.fixture()
@pytest.fixture
def archiver():
return Archiver(Path("/fake/path"))

Expand Down
2 changes: 1 addition & 1 deletion tests/test_archiver_rar.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from darkseid.archivers.rar import RarArchiver


@pytest.fixture()
@pytest.fixture
def rar_archiver(tmp_path):
# Arrange
rar_path = tmp_path / "test.rar"
Expand Down
6 changes: 3 additions & 3 deletions tests/test_archiver_zip.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
from darkseid.archivers.zip import ZipArchiver


@pytest.fixture()
@pytest.fixture
def temp_zip_file():
with tempfile.NamedTemporaryFile(suffix=".cbz", delete=False) as tmp:
yield Path(tmp.name)
tmp.close()
Path(tmp.name).unlink(missing_ok=True)


@pytest.fixture()
@pytest.fixture
def zip_archiver(temp_zip_file):
return ZipArchiver(temp_zip_file)

Expand Down Expand Up @@ -101,7 +101,7 @@ def test_get_filename_list(zip_archiver, archive_file, data):
)
def test_copy_from_archive(zip_archiver, other_archive_files, data):
# Arrange
other_archive = ZipArchiver(Path(tempfile.NamedTemporaryFile(suffix=".cbz", delete=False).name))
other_archive = ZipArchiver(Path(tempfile.NamedTemporaryFile(suffix=".cbz", delete=False).name)) # NOQA: SIM115
for file, content in zip(other_archive_files, data, strict=False):
other_archive.write_file(file, content)

Expand Down
4 changes: 2 additions & 2 deletions tests/test_comicinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
CI_XSD = Path("tests/test_files/ComicInfo.xsd")


@pytest.fixture()
@pytest.fixture
def test_credits() -> list[Credit]:
return [
Credit("Peter David", [Role("Writer")]),
Expand All @@ -37,7 +37,7 @@ def test_credits() -> list[Credit]:
]


@pytest.fixture()
@pytest.fixture
def test_meta_data(test_credits: list[Credit]) -> Metadata:
md = Metadata()
md.publisher = Publisher("DC Comics", 1, Basic("DC Black Label", 2))
Expand Down
4 changes: 2 additions & 2 deletions tests/test_metroninfo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import xml.etree.ElementTree as ET # noqa: N817
import xml.etree.ElementTree as ET
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal
from pathlib import Path
Expand All @@ -24,7 +24,7 @@
from darkseid.metroninfo import MetronInfo


@pytest.fixture()
@pytest.fixture
def metron_info():
return MetronInfo()

Expand Down

0 comments on commit ab937dc

Please sign in to comment.