From 8de6583c1ce3f6be80fd6a3c68f03b83bce6d65b Mon Sep 17 00:00:00 2001 From: Abdulkaiz Khatri <24286590+ful1e5@users.noreply.github.com> Date: Wed, 24 Apr 2024 16:57:07 +0530 Subject: [PATCH] chore: updated stub files --- src/clickgen/__init__.pyi | 1 + src/clickgen/configparser.pyi | 10 +++++----- src/clickgen/cursors.pyi | 2 +- src/clickgen/packer/__init__.pyi | 2 ++ src/clickgen/packer/windows.pyi | 4 ++-- src/clickgen/parser/__init__.pyi | 6 ++++-- src/clickgen/parser/png.pyi | 6 +++--- src/clickgen/writer/__init__.pyi | 2 ++ 8 files changed, 20 insertions(+), 13 deletions(-) diff --git a/src/clickgen/__init__.pyi b/src/clickgen/__init__.pyi index e69de29b..bda5b5a7 100644 --- a/src/clickgen/__init__.pyi +++ b/src/clickgen/__init__.pyi @@ -0,0 +1 @@ +__version__: str diff --git a/src/clickgen/configparser.pyi b/src/clickgen/configparser.pyi index 307176fd..c733b0ee 100644 --- a/src/clickgen/configparser.pyi +++ b/src/clickgen/configparser.pyi @@ -4,7 +4,7 @@ from clickgen.parser.png import DELAY as DELAY, SIZES as SIZES from clickgen.writer.windows import to_win as to_win from clickgen.writer.x11 import to_x11 as to_x11 from pathlib import Path -from typing import Any, Dict, List, TypeVar, Union +from typing import Any, Dict, List, TypeVar class ThemeSection: name: str @@ -32,11 +32,11 @@ def parse_config_section(fp: Path, d: Dict[str, Any], **kwargs) -> ConfigSection T = TypeVar('T') class CursorSection: - x11_cursor_name: Union[str, None] - x11_cursor: Union[bytes, None] + x11_cursor_name: str | None + x11_cursor: bytes | None x11_symlinks: List[str] - win_cursor_name: Union[str, None] - win_cursor: Union[bytes, None] + win_cursor_name: str | None + win_cursor: bytes | None def __init__(self, x11_cursor_name, x11_cursor, x11_symlinks, win_cursor_name, win_cursor) -> None: ... def __lt__(self, other): ... def __le__(self, other): ... diff --git a/src/clickgen/cursors.pyi b/src/clickgen/cursors.pyi index f476a1f5..12635014 100644 --- a/src/clickgen/cursors.pyi +++ b/src/clickgen/cursors.pyi @@ -10,7 +10,7 @@ class CursorImage: class CursorFrame: images: List[CursorImage] delay: int - def __init__(self, images: List[CursorImage], delay: int = ...) -> None: ... + def __init__(self, images: List[CursorImage], delay: int = 0) -> None: ... def __getitem__(self, item: int) -> CursorImage: ... def __len__(self) -> int: ... def __iter__(self) -> Iterator[CursorImage]: ... diff --git a/src/clickgen/packer/__init__.pyi b/src/clickgen/packer/__init__.pyi index 8362c71a..d68d2d0d 100644 --- a/src/clickgen/packer/__init__.pyi +++ b/src/clickgen/packer/__init__.pyi @@ -1,2 +1,4 @@ from clickgen.packer.windows import pack_win as pack_win from clickgen.packer.x11 import pack_x11 as pack_x11 + +__all__ = ['pack_win', 'pack_x11'] diff --git a/src/clickgen/packer/windows.pyi b/src/clickgen/packer/windows.pyi index 9f56442f..4fe4be52 100644 --- a/src/clickgen/packer/windows.pyi +++ b/src/clickgen/packer/windows.pyi @@ -1,9 +1,9 @@ from _typeshed import Incomplete from pathlib import Path from string import Template -from typing import Dict, Optional +from typing import Dict FILE_TEMPLETES: Dict[str, Template] all_wreg: Incomplete -def pack_win(dir: Path, theme_name: str, comment: str, website: Optional[str] = ...) -> None: ... +def pack_win(dir: Path, theme_name: str, comment: str, website: str | None = None) -> None: ... diff --git a/src/clickgen/parser/__init__.pyi b/src/clickgen/parser/__init__.pyi index e25f110c..df334390 100644 --- a/src/clickgen/parser/__init__.pyi +++ b/src/clickgen/parser/__init__.pyi @@ -1,5 +1,7 @@ from clickgen.parser.base import BaseParser from clickgen.parser.png import MultiPNGParser as MultiPNGParser, SinglePNGParser as SinglePNGParser -from typing import List, Optional, Tuple, Union +from typing import List, Tuple -def open_blob(blob: Union[bytes, List[bytes]], hotspot: Tuple[int, int], sizes: Optional[List[int]] = ..., delay: Optional[int] = ...) -> BaseParser: ... +__all__ = ['SinglePNGParser', 'MultiPNGParser', 'open_blob'] + +def open_blob(blob: bytes | List[bytes], hotspot: Tuple[int, int], sizes: List[int] | None = None, delay: int | None = None) -> BaseParser: ... diff --git a/src/clickgen/parser/png.pyi b/src/clickgen/parser/png.pyi index a4776df5..d561836f 100644 --- a/src/clickgen/parser/png.pyi +++ b/src/clickgen/parser/png.pyi @@ -1,7 +1,7 @@ from _typeshed import Incomplete from clickgen.cursors import CursorFrame as CursorFrame, CursorImage as CursorImage from clickgen.parser.base import BaseParser as BaseParser -from typing import List, Optional, Tuple +from typing import List, Tuple SIZES: Incomplete DELAY: int @@ -14,10 +14,10 @@ class SinglePNGParser(BaseParser): delay: Incomplete hotspot: Incomplete frames: Incomplete - def __init__(self, blob: bytes, hotspot: Tuple[int, int], sizes: Optional[List[int]] = ..., delay: Optional[int] = ...) -> None: ... + def __init__(self, blob: bytes, hotspot: Tuple[int, int], sizes: List[int] | None = None, delay: int | None = None) -> None: ... class MultiPNGParser(BaseParser): @classmethod def can_parse(cls, blobs: List[bytes]) -> bool: ... frames: Incomplete - def __init__(self, blobs: List[bytes], hotspot: Tuple[int, int], sizes: Optional[List[int]] = ..., delay: Optional[int] = ...) -> None: ... + def __init__(self, blobs: List[bytes], hotspot: Tuple[int, int], sizes: List[int] | None = None, delay: int | None = None) -> None: ... diff --git a/src/clickgen/writer/__init__.pyi b/src/clickgen/writer/__init__.pyi index d0078786..e2c7d0a5 100644 --- a/src/clickgen/writer/__init__.pyi +++ b/src/clickgen/writer/__init__.pyi @@ -1,2 +1,4 @@ from clickgen.writer.windows import to_cur as to_cur, to_win as to_win from clickgen.writer.x11 import to_x11 as to_x11 + +__all__ = ['to_x11', 'to_cur', 'to_win']