drop ellipsis assignments from module vars, classvars and instance attrs (#5914)

Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
Oleg Höfling
2021-08-11 19:26:58 +02:00
committed by GitHub
parent 6c41e3cead
commit 64f481189f
34 changed files with 325 additions and 325 deletions

View File

@@ -111,43 +111,43 @@ _XYScrollCommand = Union[str, Callable[[float, float], Any]] # -xscrollcommand
_TakeFocusValue = Union[int, Literal[""], Callable[[str], Optional[bool]]] # -takefocus in manual page named 'options'
class EventType(str, Enum):
Activate: str = ...
ButtonPress: str = ...
ButtonRelease: str = ...
Circulate: str = ...
CirculateRequest: str = ...
ClientMessage: str = ...
Colormap: str = ...
Configure: str = ...
ConfigureRequest: str = ...
Create: str = ...
Deactivate: str = ...
Destroy: str = ...
Enter: str = ...
Expose: str = ...
FocusIn: str = ...
FocusOut: str = ...
GraphicsExpose: str = ...
Gravity: str = ...
KeyPress: str = ...
KeyRelease: str = ...
Keymap: str = ...
Leave: str = ...
Map: str = ...
MapRequest: str = ...
Mapping: str = ...
Motion: str = ...
MouseWheel: str = ...
NoExpose: str = ...
Property: str = ...
Reparent: str = ...
ResizeRequest: str = ...
Selection: str = ...
SelectionClear: str = ...
SelectionRequest: str = ...
Unmap: str = ...
VirtualEvent: str = ...
Visibility: str = ...
Activate: str
ButtonPress: str
ButtonRelease: str
Circulate: str
CirculateRequest: str
ClientMessage: str
Colormap: str
Configure: str
ConfigureRequest: str
Create: str
Deactivate: str
Destroy: str
Enter: str
Expose: str
FocusIn: str
FocusOut: str
GraphicsExpose: str
Gravity: str
KeyPress: str
KeyRelease: str
Keymap: str
Leave: str
Map: str
MapRequest: str
Mapping: str
Motion: str
MouseWheel: str
NoExpose: str
Property: str
Reparent: str
ResizeRequest: str
Selection: str
SelectionClear: str
SelectionRequest: str
Unmap: str
VirtualEvent: str
Visibility: str
_W = TypeVar("_W", bound="Misc")
# Events considered covariant because you should never assign to event.widget.

View File

@@ -1,8 +1,8 @@
from typing import Any, ClassVar, Mapping
class Dialog:
command: ClassVar[str | None] = ...
master: Any | None = ...
options: Mapping[str, Any] = ...
command: ClassVar[str | None]
master: Any | None
options: Mapping[str, Any]
def __init__(self, master: Any | None = ..., **options) -> None: ...
def show(self, **options) -> Any: ...

View File

@@ -4,7 +4,7 @@ from typing import Any, Mapping
DIALOG_ICON: str
class Dialog(Widget):
widgetName: str = ...
num: int = ...
widgetName: str
num: int
def __init__(self, master: Any | None = ..., cnf: Mapping[str, Any] = ..., **kw) -> None: ...
def destroy(self) -> None: ...

View File

@@ -6,25 +6,25 @@ from typing_extensions import Literal
dialogstates: dict[Any, Tuple[Any, Any]]
class FileDialog:
title: str = ...
master: Any = ...
directory: Any | None = ...
top: Toplevel = ...
botframe: Frame = ...
selection: Entry = ...
filter: Entry = ...
midframe: Entry = ...
filesbar: Scrollbar = ...
files: Listbox = ...
dirsbar: Scrollbar = ...
dirs: Listbox = ...
ok_button: Button = ...
filter_button: Button = ...
cancel_button: Button = ...
title: str
master: Any
directory: Any | None
top: Toplevel
botframe: Frame
selection: Entry
filter: Entry
midframe: Entry
filesbar: Scrollbar
files: Listbox
dirsbar: Scrollbar
dirs: Listbox
ok_button: Button
filter_button: Button
cancel_button: Button
def __init__(
self, master, title: Any | None = ...
) -> None: ... # title is usually a str or None, but e.g. int doesn't raise en exception either
how: Any | None = ...
how: Any | None
def go(self, dir_or_file: Any = ..., pattern: str = ..., default: str = ..., key: Any | None = ...): ...
def quit(self, how: Any | None = ...) -> None: ...
def dirs_double_event(self, event) -> None: ...
@@ -41,23 +41,23 @@ class FileDialog:
def set_selection(self, file) -> None: ...
class LoadFileDialog(FileDialog):
title: str = ...
title: str
def ok_command(self) -> None: ...
class SaveFileDialog(FileDialog):
title: str = ...
title: str
def ok_command(self): ...
class _Dialog(commondialog.Dialog): ...
class Open(_Dialog):
command: ClassVar[str] = ...
command: ClassVar[str]
class SaveAs(_Dialog):
command: ClassVar[str] = ...
command: ClassVar[str]
class Directory(commondialog.Dialog):
command: ClassVar[str] = ...
command: ClassVar[str]
# TODO: command kwarg available on macos
def asksaveasfilename(

View File

@@ -19,7 +19,7 @@ YES: str
NO: str
class Message(Dialog):
command: ClassVar[str] = ...
command: ClassVar[str]
def showinfo(title: str | None = ..., message: str | None = ..., **options: Any) -> str: ...
def showwarning(title: str | None = ..., message: str | None = ..., **options: Any) -> str: ...