Skip to content

Commit

Permalink
chore: updated stub files
Browse files Browse the repository at this point in the history
  • Loading branch information
ful1e5 committed Apr 24, 2024
1 parent d70bd2b commit 8de6583
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 13 deletions.
1 change: 1 addition & 0 deletions src/clickgen/__init__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__: str
10 changes: 5 additions & 5 deletions src/clickgen/configparser.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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): ...
Expand Down
2 changes: 1 addition & 1 deletion src/clickgen/cursors.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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]: ...
2 changes: 2 additions & 0 deletions src/clickgen/packer/__init__.pyi
Original file line number Diff line number Diff line change
@@ -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']
4 changes: 2 additions & 2 deletions src/clickgen/packer/windows.pyi
Original file line number Diff line number Diff line change
@@ -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: ...
6 changes: 4 additions & 2 deletions src/clickgen/parser/__init__.pyi
Original file line number Diff line number Diff line change
@@ -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: ...
6 changes: 3 additions & 3 deletions src/clickgen/parser/png.pyi
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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: ...
2 changes: 2 additions & 0 deletions src/clickgen/writer/__init__.pyi
Original file line number Diff line number Diff line change
@@ -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']

0 comments on commit 8de6583

Please sign in to comment.