Fix cbr tests and update pre-commit

This commit is contained in:
Timmy Welch 2023-09-04 19:56:18 -05:00
parent 0f07fc3153
commit 7a63474769
2 changed files with 12 additions and 12 deletions

View File

@ -14,12 +14,12 @@ repos:
hooks:
- id: setup-cfg-fmt
- repo: https://github.com/PyCQA/autoflake
rev: v2.2.0
rev: v2.2.1
hooks:
- id: autoflake
args: [-i, --remove-all-unused-imports, --ignore-init-module-imports]
- repo: https://github.com/asottile/pyupgrade
rev: v3.8.0
rev: v3.10.1
hooks:
- id: pyupgrade
args: [--py39-plus]
@ -29,16 +29,16 @@ repos:
- id: isort
args: [--af,--add-import, 'from __future__ import annotations']
- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.7.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies: [flake8-encodings, flake8-warnings, flake8-builtins, flake8-length, flake8-print]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
rev: v1.5.1
hooks:
- id: mypy
additional_dependencies: [types-setuptools, types-requests, settngs>=0.7.1]

View File

@ -60,7 +60,7 @@ def test_save_cbi(tmp_comic):
@pytest.mark.xfail(not (comicapi.archivers.rar.rar_support and shutil.which("rar")), reason="rar support")
def test_save_cix_rar(tmp_path):
def test_save_cix_rar(tmp_path, md_saved):
cbr_path = datadir / "fake_cbr.cbr"
shutil.copy(cbr_path, tmp_path)
@ -69,7 +69,7 @@ def test_save_cix_rar(tmp_path):
assert tmp_comic.write_cix(comicapi.genericmetadata.md_test)
md = tmp_comic.read_cix()
assert md.replace(pages=[]) == comicapi.genericmetadata.md_test.replace(pages=[])
assert md.replace(pages=[], page_count=0) == md_saved.replace(pages=[], page_count=0)
@pytest.mark.xfail(not (comicapi.archivers.rar.rar_support and shutil.which("rar")), reason="rar support")
@ -95,12 +95,12 @@ def test_save_cbi_rar(tmp_path, md_saved):
manga=None,
page_count=None,
maturity_rating=None,
story_arc=None,
series_group=None,
story_arcs=[],
series_groups=[],
scan_info=None,
characters=None,
teams=None,
locations=None,
characters=[],
teams=[],
locations=[],
)