This commit is contained in:
Zeecka
2026-01-07 04:25:33 +01:00
parent c3543cca73
commit 5e39d88ad6
2 changed files with 2 additions and 7 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
# flake8: noqa: E203,E501,W503 # flake8: noqa: E203,E501,W503
# pylint: disable=C0413,W0718,R0903,R0801 # pylint: disable=C0413,W0718,R0903,R0801,R0902
# mypy: disable-error-code=unused-awaitable # mypy: disable-error-code=unused-awaitable
"""PNG Class for analyzer modules""" """PNG Class for analyzer modules"""
@@ -11,7 +11,7 @@ from typing import Any, Optional
from ..app import app from ..app import app
from ..models import IHDR from ..models import IHDR
from .utils import int2hex, str2hex, str2num from .utils import int2hex, str2hex
__author__ = [ __author__ = [
"Zeecka", "Zeecka",
-5
View File
@@ -19,11 +19,6 @@ def int2hex(i: int) -> str:
return "0x" + hex(i)[2:].upper() return "0x" + hex(i)[2:].upper()
def str2num(s: bytes, n: int = 0) -> int:
"""Convert bytes to number."""
return struct.unpack("!I", s)[0] if n == 4 else int(str2hex(s), 16)
def get_resolutions() -> list[tuple[int, int]]: def get_resolutions() -> list[tuple[int, int]]:
""" """
Generate a sorted list of common display and image resolutions. Generate a sorted list of common display and image resolutions.