[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2024-01-29 17:14:25 +00:00
parent 6687e5c6ca
commit df762746ec
45 changed files with 47 additions and 20 deletions

View File

@ -6,7 +6,6 @@ from typing import Protocol, runtime_checkable
@runtime_checkable
class Archiver(Protocol):
"""Archiver Protocol"""
"""The path to the archive"""

View File

@ -10,7 +10,6 @@ logger = logging.getLogger(__name__)
class FolderArchiver(Archiver):
"""Folder implementation"""
def __init__(self) -> None:

View File

@ -17,7 +17,6 @@ logger = logging.getLogger(__name__)
class ZipArchiver(Archiver):
"""ZIP implementation"""
def __init__(self) -> None:

View File

@ -1,4 +1,5 @@
"""A class to represent a single comic, be it file or folder of images"""
# Copyright 2012-2014 ComicTagger Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -88,8 +88,7 @@ class Item:
class LexerFunc(Protocol):
def __call__(self, __origin: Lexer) -> LexerFunc | None:
...
def __call__(self, __origin: Lexer) -> LexerFunc | None: ...
class Lexer:

View File

@ -2,6 +2,7 @@
This should probably be re-written, but, well, it mostly works!
"""
# Copyright 2012-2014 ComicTagger Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
@ -344,8 +345,7 @@ protofolius_issue_number_scheme = {
class ParserFunc(Protocol):
def __call__(self, __origin: Parser) -> ParserFunc | None:
...
def __call__(self, __origin: Parser) -> ParserFunc | None: ...
eof = filenamelexer.Item(filenamelexer.ItemType.EOF, -1, "")

View File

@ -5,6 +5,7 @@ tagging schemes and databases, such as ComicVine or GCD. This makes conversion
possible, however lossy it might be
"""
# Copyright 2012-2014 ComicTagger Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
@ -34,7 +35,6 @@ logger = logging.getLogger(__name__)
class PageType:
"""
These page info classes are exactly the same as the CIX scheme, since
it's unique

View File

@ -4,6 +4,7 @@ Class for handling the odd permutations of an 'issue number' that the
comics industry throws at us.
e.g.: "12", "12.1", "0", "-1", "5AU", "100-2"
"""
# Copyright 2012-2014 ComicTagger Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,4 +1,5 @@
"""A class to encapsulate CoMet data"""
#
# Copyright 2012-2014 ComicTagger Authors
#

View File

@ -1,4 +1,5 @@
"""A class to encapsulate the ComicBookInfo data"""
# Copyright 2012-2014 ComicTagger Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,4 +1,5 @@
"""A class to encapsulate ComicRack's ComicInfo.xml data"""
# Copyright 2012-2014 ComicTagger Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,4 +1,5 @@
"""Some generic utilities"""
# Copyright 2012-2014 ComicTagger Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,4 +1,5 @@
"""A PyQT4 dialog to select from automated issue matches"""
#
# Copyright 2012-2014 ComicTagger Authors
#

View File

@ -1,4 +1,5 @@
"""A PyQT4 dialog to show ID log and progress"""
#
# Copyright 2012-2014 ComicTagger Authors
#

View File

@ -1,4 +1,5 @@
"""A PyQT4 dialog to confirm and set config for auto-tag"""
#
# Copyright 2012-2014 ComicTagger Authors
#

View File

@ -1,4 +1,5 @@
"""A class to manage modifying metadata specifically for CBL/CBI"""
#
# Copyright 2012-2014 ComicTagger Authors
#

View File

@ -3,6 +3,7 @@
Display cover images from either a local archive, or from comic source metadata.
TODO: This should be re-factored using subclasses!
"""
#
# Copyright 2012-2014 ComicTagger Authors
#

View File

@ -1,4 +1,5 @@
"""A PyQT4 dialog to edit credits"""
#
# Copyright 2012-2014 ComicTagger Authors
#

View File

@ -1,4 +1,5 @@
"""CLI settings for ComicTagger"""
#
# Copyright 2012-2014 ComicTagger Authors
#

View File

@ -1,4 +1,5 @@
"""A PyQT4 dialog to confirm and set options for export to zip"""
#
# Copyright 2012-2014 ComicTagger Authors
#

View File

@ -1,4 +1,5 @@
"""Functions for renaming files based on metadata"""
#
# Copyright 2012-2014 ComicTagger Authors
#

View File

@ -1,4 +1,5 @@
"""A PyQt5 widget for managing list of comic archive files"""
#
# Copyright 2012-2014 ComicTagger Authors
#

View File

@ -84,8 +84,7 @@ try:
except ImportError as e:
def show_exception_box(log_msg: str) -> None:
...
def show_exception_box(log_msg: str) -> None: ...
logger.exception("Qt unavailable")
qt_available = False

View File

@ -1,4 +1,5 @@
"""A class to manage fetching and caching of images by URL"""
#
# Copyright 2012-2014 ComicTagger Authors
#
@ -34,12 +35,10 @@ if TYPE_CHECKING:
logger = logging.getLogger(__name__)
class ImageFetcherException(Exception):
...
class ImageFetcherException(Exception): ...
def fetch_complete(url: str, image_data: bytes | QtCore.QByteArray) -> None:
...
def fetch_complete(url: str, image_data: bytes | QtCore.QByteArray) -> None: ...
class ImageFetcher:

View File

@ -1,4 +1,5 @@
"""A class to manage creating image content hashes, and calculate hamming distances"""
#
# Copyright 2013 ComicTagger Authors
#

View File

@ -1,4 +1,5 @@
"""A PyQT4 widget to display a popup image"""
#
# Copyright 2012-2014 ComicTagger Authors
#

View File

@ -1,4 +1,5 @@
"""A class to automatically identify a comic archive"""
#
# Copyright 2012-2014 ComicTagger Authors
#
@ -56,12 +57,10 @@ class Score(TypedDict):
hash: int
class IssueIdentifierNetworkError(Exception):
...
class IssueIdentifierNetworkError(Exception): ...
class IssueIdentifierCancelled(Exception):
...
class IssueIdentifierCancelled(Exception): ...
class IssueIdentifier:

View File

@ -1,4 +1,5 @@
"""A PyQT4 dialog to select specific issue from list"""
#
# Copyright 2012-2014 ComicTagger Authors
#

View File

@ -1,4 +1,5 @@
"""A PyQT4 dialog to a text file or log"""
#
# Copyright 2012-2014 ComicTagger Authors
#

View File

@ -1,4 +1,5 @@
"""A python app to (automatically) tag comic archives"""
#
# Copyright 2012-2014 ComicTagger Authors
#

View File

@ -1,4 +1,5 @@
"""A PyQT4 dialog to select from automated issue matches"""
#
# Copyright 2012-2014 ComicTagger Authors
#

View File

@ -10,6 +10,7 @@ said_yes, checked = OptionalMessageDialog.question(self, "QtWidgets.Question",
"Are you sure you wish to do this?",
)
"""
#
# Copyright 2012-2014 ComicTagger Authors
#

View File

@ -1,4 +1,5 @@
"""A PyQT4 dialog to show pages of a comic archive"""
#
# Copyright 2012-2014 ComicTagger Authors
#

View File

@ -1,4 +1,5 @@
"""A PyQt5 widget for editing the page list info"""
#
# Copyright 2012-2014 ComicTagger Authors
#

View File

@ -1,4 +1,5 @@
"""A PyQT4 class to load a page image from a ComicArchive in a background thread"""
#
# Copyright 2012-2014 ComicTagger Authors
#

View File

@ -1,4 +1,5 @@
"""A PyQt5 dialog to show ID log and progress"""
#
# Copyright 2012-2014 ComicTagger Authors
#

View File

@ -1,4 +1,5 @@
"""A PyQT4 dialog to confirm rename"""
#
# Copyright 2012-2014 ComicTagger Authors
#

View File

@ -1,4 +1,5 @@
"""A PyQT4 dialog to select specific series/volume from list"""
#
# Copyright 2012-2014 ComicTagger Authors
#

View File

@ -1,4 +1,5 @@
"""A PyQT4 dialog to enter app settings"""
#
# Copyright 2012-2014 ComicTagger Authors
#

View File

@ -1,4 +1,5 @@
"""The main window of the ComicTagger app"""
#
# Copyright 2012-2014 ComicTagger Authors
#

View File

@ -89,8 +89,7 @@ if qt_available:
except ImportError:
def new_web_view(parent: QWidget) -> QWebEngineView:
...
def new_web_view(parent: QWidget) -> QWebEngineView: ...
def reduce_widget_font_size(widget: QtWidgets.QWidget, delta: int = 2) -> None:
f = widget.font()

View File

@ -1,4 +1,5 @@
"""Version checker"""
#
# Copyright 2013 ComicTagger Authors
#

View File

@ -1,4 +1,5 @@
"""A python class to manage caching of metadata from comic sources"""
#
# Copyright 2012-2014 ComicTagger Authors
#

View File

@ -1,6 +1,7 @@
"""
ComicVine information source
"""
# Copyright 2012-2014 ComicTagger Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -9,6 +9,7 @@ format is
bool(xfail: expected failure on the old parser)
)
"""
from __future__ import annotations
import datetime