mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-19 23:09:55 +08:00
Add defaults for third-party stubs Q-T (#9959)
This commit is contained in:
@@ -3,5 +3,5 @@ from _typeshed import Incomplete
|
||||
def temporary_chdir(new_dir) -> None: ...
|
||||
def get_file_directory(): ...
|
||||
def get_temp_directory(): ...
|
||||
def get_themes_directory(theme_name: Incomplete | None = ..., png: bool = ...): ...
|
||||
def get_themes_directory(theme_name: Incomplete | None = None, png: bool = False): ...
|
||||
def create_directory(directory): ...
|
||||
|
||||
@@ -7,7 +7,7 @@ class ThemedWidget:
|
||||
PACKAGES: ClassVar[dict[str, str]]
|
||||
tk: _tkinter.TkappType
|
||||
png_support: bool
|
||||
def __init__(self, tk_interpreter, gif_override: bool = ...) -> None: ...
|
||||
def __init__(self, tk_interpreter, gif_override: bool = False) -> None: ...
|
||||
def set_theme(self, theme_name: str) -> None: ...
|
||||
def get_themes(self) -> list[str]: ...
|
||||
@property
|
||||
@@ -17,10 +17,10 @@ class ThemedWidget:
|
||||
def set_theme_advanced(
|
||||
self,
|
||||
theme_name: str,
|
||||
brightness: float = ...,
|
||||
saturation: float = ...,
|
||||
hue: float = ...,
|
||||
preserve_transparency: bool = ...,
|
||||
output_dir: StrPath | None = ...,
|
||||
advanced_name: str = ...,
|
||||
brightness: float = 1.0,
|
||||
saturation: float = 1.0,
|
||||
hue: float = 1.0,
|
||||
preserve_transparency: bool = True,
|
||||
output_dir: StrPath | None = None,
|
||||
advanced_name: str = "advanced",
|
||||
) -> None: ...
|
||||
|
||||
@@ -8,5 +8,5 @@ class ThemedStyle(ttk.Style, ThemedWidget):
|
||||
self, master: tkinter.Misc | None = ..., *, theme: str | None = ..., gif_override: bool | None = ..., **kwargs
|
||||
) -> None: ...
|
||||
# theme_use() can't return None (differs from ttk.Style)
|
||||
def theme_use(self, theme_name: str | None = ...) -> str: ... # type: ignore[override]
|
||||
def theme_use(self, theme_name: str | None = None) -> str: ... # type: ignore[override]
|
||||
def theme_names(self) -> list[str]: ... # type: ignore[override]
|
||||
|
||||
@@ -21,10 +21,10 @@ class ThemedTk(tkinter.Tk, ThemedWidget):
|
||||
background: bool | None = ..., # old alias for themebg
|
||||
gif_override: bool = ...,
|
||||
) -> None: ...
|
||||
def set_theme(self, theme_name, toplevel: bool | None = ..., themebg: bool | None = ...) -> None: ...
|
||||
def set_theme(self, theme_name, toplevel: bool | None = None, themebg: bool | None = None) -> None: ...
|
||||
# TODO: currently no good way to say "use the same big list of kwargs as parent class but also add these"
|
||||
def config(self, kw: Incomplete | None = ..., **kwargs): ... # type: ignore[override]
|
||||
def config(self, kw: Incomplete | None = None, **kwargs): ... # type: ignore[override]
|
||||
def cget(self, k): ...
|
||||
def configure(self, kw: Incomplete | None = ..., **kwargs): ... # type: ignore[override]
|
||||
def configure(self, kw: Incomplete | None = None, **kwargs): ... # type: ignore[override]
|
||||
def __getitem__(self, k): ...
|
||||
def __setitem__(self, k, v) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user