Skip to content

Commit 706fbbe

Browse files
committed
chore: updated stub/type files
1 parent e7b743c commit 706fbbe

File tree

10 files changed

+27
-33
lines changed

10 files changed

+27
-33
lines changed

src/clickgen/configparser.pyi

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ from clickgen.parser.png import DELAY as DELAY, SIZES as SIZES
44
from clickgen.writer.windows import to_win as to_win
55
from clickgen.writer.x11 import to_x11 as to_x11
66
from pathlib import Path
7-
from typing import Any, Dict, List, TypeVar
7+
from typing import Any, TypeVar
88

99
class ThemeSection:
1010
name: str
@@ -16,25 +16,25 @@ class ThemeSection:
1616
def __gt__(self, other): ...
1717
def __ge__(self, other): ...
1818

19-
def parse_theme_section(d: Dict[str, Any], **kwargs) -> ThemeSection: ...
19+
def parse_theme_section(d: dict[str, Any], **kwargs) -> ThemeSection: ...
2020

2121
class ConfigSection:
2222
bitmaps_dir: Path
2323
out_dir: Path
24-
platforms: List[str]
24+
platforms: list[str]
2525
def __init__(self, bitmaps_dir, out_dir, platforms) -> None: ...
2626
def __lt__(self, other): ...
2727
def __le__(self, other): ...
2828
def __gt__(self, other): ...
2929
def __ge__(self, other): ...
3030

31-
def parse_config_section(fp: Path, d: Dict[str, Any], **kwargs) -> ConfigSection: ...
31+
def parse_config_section(fp: Path, d: dict[str, Any], **kwargs) -> ConfigSection: ...
3232
T = TypeVar('T')
3333

3434
class CursorSection:
3535
x11_cursor_name: str | None
3636
x11_cursor: bytes | None
37-
x11_symlinks: List[str]
37+
x11_symlinks: list[str]
3838
win_cursor_name: str | None
3939
win_cursor: bytes | None
4040
def __init__(self, x11_cursor_name, x11_cursor, x11_symlinks, win_cursor_name, win_cursor) -> None: ...
@@ -43,12 +43,12 @@ class CursorSection:
4343
def __gt__(self, other): ...
4444
def __ge__(self, other): ...
4545

46-
def parse_cursors_section(d: Dict[str, Any], config: ConfigSection, **kwargs) -> List[CursorSection]: ...
46+
def parse_cursors_section(d: dict[str, Any], config: ConfigSection, **kwargs) -> list[CursorSection]: ...
4747

4848
class ClickgenConfig:
4949
theme: ThemeSection
5050
config: ConfigSection
51-
cursors: List[CursorSection]
51+
cursors: list[CursorSection]
5252
def __init__(self, theme, config, cursors) -> None: ...
5353
def __lt__(self, other): ...
5454
def __le__(self, other): ...

src/clickgen/cursors.pyi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
from PIL.Image import Image as Image
2-
from typing import Iterator, List, Tuple
2+
from typing import Iterator
33

44
class CursorImage:
55
image: Image
6-
hotspot: Tuple[int, int]
6+
hotspot: tuple[int, int]
77
nominal: int
8-
def __init__(self, image: Image, hotspot: Tuple[int, int], nominal: int) -> None: ...
8+
def __init__(self, image: Image, hotspot: tuple[int, int], nominal: int) -> None: ...
99

1010
class CursorFrame:
11-
images: List[CursorImage]
11+
images: list[CursorImage]
1212
delay: int
13-
def __init__(self, images: List[CursorImage], delay: int = 0) -> None: ...
13+
def __init__(self, images: list[CursorImage], delay: int = 0) -> None: ...
1414
def __getitem__(self, item: int) -> CursorImage: ...
1515
def __len__(self) -> int: ...
1616
def __iter__(self) -> Iterator[CursorImage]: ...

src/clickgen/packer/windows.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
from _typeshed import Incomplete
22
from pathlib import Path
33
from string import Template
4-
from typing import Dict
54

6-
FILE_TEMPLETES: Dict[str, Template]
5+
FILE_TEMPLETES: dict[str, Template]
76
all_wreg: Incomplete
87

98
def pack_win(dir: Path, theme_name: str, comment: str, website: str | None = None) -> None: ...

src/clickgen/packer/x11.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from pathlib import Path
22
from string import Template
3-
from typing import Dict
43

5-
FILE_TEMPLATES: Dict[str, Template]
4+
FILE_TEMPLATES: dict[str, Template]
65

76
def pack_x11(dir: Path, theme_name: str, comment: str) -> None: ...

src/clickgen/parser/__init__.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from clickgen.parser.base import BaseParser
22
from clickgen.parser.png import MultiPNGParser as MultiPNGParser, SinglePNGParser as SinglePNGParser
3-
from typing import List, Tuple
43

54
__all__ = ['SinglePNGParser', 'MultiPNGParser', 'open_blob']
65

7-
def open_blob(blob: bytes | List[bytes], hotspot: Tuple[int, int], sizes: List[int] | None = None, delay: int | None = None) -> BaseParser: ...
6+
def open_blob(blob: bytes | list[bytes], hotspot: tuple[int, int], sizes: list[int] | None = None, delay: int | None = None) -> BaseParser: ...

src/clickgen/parser/base.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from abc import ABCMeta, abstractmethod
22
from clickgen.cursors import CursorFrame as CursorFrame
3-
from typing import Any, List
3+
from typing import Any
44

55
class BaseParser(metaclass=ABCMeta):
66
blob: bytes
7-
frames: List[CursorFrame]
7+
frames: list[CursorFrame]
88
@abstractmethod
99
def __init__(self, blob: bytes): ...
1010
@classmethod

src/clickgen/parser/png.pyi

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from _typeshed import Incomplete
22
from clickgen.cursors import CursorFrame as CursorFrame, CursorImage as CursorImage
33
from clickgen.parser.base import BaseParser as BaseParser
4-
from typing import List, Tuple
54

65
SIZES: Incomplete
76
DELAY: int
@@ -14,10 +13,10 @@ class SinglePNGParser(BaseParser):
1413
delay: Incomplete
1514
hotspot: Incomplete
1615
frames: Incomplete
17-
def __init__(self, blob: bytes, hotspot: Tuple[int, int], sizes: List[int] | None = None, delay: int | None = None) -> None: ...
16+
def __init__(self, blob: bytes, hotspot: tuple[int, int], sizes: list[int | str] | None = None, delay: int | None = None) -> None: ...
1817

1918
class MultiPNGParser(BaseParser):
2019
@classmethod
21-
def can_parse(cls, blobs: List[bytes]) -> bool: ...
20+
def can_parse(cls, blobs: list[bytes]) -> bool: ...
2221
frames: Incomplete
23-
def __init__(self, blobs: List[bytes], hotspot: Tuple[int, int], sizes: List[int] | None = None, delay: int | None = None) -> None: ...
22+
def __init__(self, blobs: list[bytes], hotspot: tuple[int, int], sizes: list[int] | None = None, delay: int | None = None) -> None: ...

src/clickgen/scripts/ctgen.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ from clickgen.configparser import parse_config_file as parse_config_file
22
from clickgen.libs.colors import blue as blue, bold as bold, cyan as cyan, fail as fail, magenta as magenta, print_done as print_done, print_info as print_info, print_subtext as print_subtext, print_text as print_text
33
from clickgen.packer.windows import pack_win as pack_win
44
from clickgen.packer.x11 import pack_x11 as pack_x11
5-
from typing import Any, Dict, Generator
5+
from typing import Any, Generator
66

7-
def get_kwargs(args) -> Dict[str, Any]: ...
7+
def get_kwargs(args) -> dict[str, Any]: ...
88
def cwd(path) -> Generator[None, None, None]: ...
99
def main() -> None: ...

src/clickgen/writer/windows.pyi

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from _typeshed import Incomplete
22
from clickgen.cursors import CursorFrame as CursorFrame
3-
from typing import List, Tuple
43

54
MAGIC: bytes
65
ICO_TYPE_CUR: int
@@ -24,7 +23,7 @@ UNSIGNED: Incomplete
2423
SEQUENCE_FLAG: int
2524
ICON_FLAG: int
2625

27-
def get_ani_cur_list(frames: List[CursorFrame]) -> bytes: ...
28-
def get_ani_rate_chunk(frames: List[CursorFrame]) -> bytes: ...
29-
def to_ani(frames: List[CursorFrame]) -> bytes: ...
30-
def to_win(frames: List[CursorFrame]) -> Tuple[str, bytes]: ...
26+
def get_ani_cur_list(frames: list[CursorFrame]) -> bytes: ...
27+
def get_ani_rate_chunk(frames: list[CursorFrame]) -> bytes: ...
28+
def to_ani(frames: list[CursorFrame]) -> bytes: ...
29+
def to_win(frames: list[CursorFrame]) -> tuple[str, bytes]: ...

src/clickgen/writer/x11.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from _typeshed import Incomplete
22
from clickgen.cursors import CursorFrame as CursorFrame
3-
from typing import List
43

54
MAGIC: bytes
65
VERSION: int
@@ -10,4 +9,4 @@ CHUNK_IMAGE: int
109
IMAGE_HEADER: Incomplete
1110

1211
def premultiply_alpha(source: bytes) -> bytes: ...
13-
def to_x11(frames: List[CursorFrame]) -> bytes: ...
12+
def to_x11(frames: list[CursorFrame]) -> bytes: ...

0 commit comments

Comments
 (0)