mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Use typeshed.Incomplete and object instead of Any in tkinter stubs (#8458)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import tkinter
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any
|
||||
from typing_extensions import Literal
|
||||
|
||||
@@ -56,12 +57,12 @@ class TixWidget(tkinter.Widget):
|
||||
cnf: dict[str, Any] = ...,
|
||||
kw: dict[str, Any] = ...,
|
||||
) -> None: ...
|
||||
def __getattr__(self, name: str) -> Any: ...
|
||||
def __getattr__(self, name: str): ...
|
||||
def set_silent(self, value: str) -> None: ...
|
||||
def subwidget(self, name: str) -> tkinter.Widget: ...
|
||||
def subwidgets_all(self) -> list[tkinter.Widget]: ...
|
||||
def config_all(self, option: Any, value: Any) -> None: ...
|
||||
def image_create(self, imgtype: str, cnf: dict[str, Any] = ..., master: tkinter.Widget | None = ..., **kw: Any) -> None: ...
|
||||
def image_create(self, imgtype: str, cnf: dict[str, Any] = ..., master: tkinter.Widget | None = ..., **kw) -> None: ...
|
||||
def image_delete(self, imgname: str) -> None: ...
|
||||
|
||||
class TixSubWidget(TixWidget):
|
||||
@@ -70,102 +71,102 @@ class TixSubWidget(TixWidget):
|
||||
) -> None: ...
|
||||
|
||||
class DisplayStyle:
|
||||
def __init__(self, itemtype: str, cnf: dict[str, Any] = ..., *, master: tkinter.Widget | None = ..., **kw: Any) -> None: ...
|
||||
def __getitem__(self, key: str) -> Any: ...
|
||||
def __init__(self, itemtype: str, cnf: dict[str, Any] = ..., *, master: tkinter.Widget | None = ..., **kw) -> None: ...
|
||||
def __getitem__(self, key: str): ...
|
||||
def __setitem__(self, key: str, value: Any) -> None: ...
|
||||
def delete(self) -> None: ...
|
||||
def config(self, cnf: dict[str, Any] = ..., **kw: Any) -> Any: ...
|
||||
def config(self, cnf: dict[str, Any] = ..., **kw): ...
|
||||
|
||||
class Balloon(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def bind_widget(self, widget: tkinter.Widget, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def bind_widget(self, widget: tkinter.Widget, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def unbind_widget(self, widget: tkinter.Widget) -> None: ...
|
||||
|
||||
class ButtonBox(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def add(self, name: str, cnf: dict[str, Any] = ..., **kw: Any) -> tkinter.Widget: ...
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def add(self, name: str, cnf: dict[str, Any] = ..., **kw) -> tkinter.Widget: ...
|
||||
def invoke(self, name: str) -> None: ...
|
||||
|
||||
class ComboBox(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def add_history(self, str: str) -> None: ...
|
||||
def append_history(self, str: str) -> None: ...
|
||||
def insert(self, index: int, str: str) -> None: ...
|
||||
def pick(self, index: int) -> None: ...
|
||||
|
||||
class Control(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def decrement(self) -> None: ...
|
||||
def increment(self) -> None: ...
|
||||
def invoke(self) -> None: ...
|
||||
|
||||
class LabelEntry(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
|
||||
class LabelFrame(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
|
||||
class Meter(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
|
||||
class OptionMenu(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def add_command(self, name: str, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def add_separator(self, name: str, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def add_command(self, name: str, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def add_separator(self, name: str, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def delete(self, name: str) -> None: ...
|
||||
def disable(self, name: str) -> None: ...
|
||||
def enable(self, name: str) -> None: ...
|
||||
|
||||
class PopupMenu(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def bind_widget(self, widget: tkinter.Widget) -> None: ...
|
||||
def unbind_widget(self, widget: tkinter.Widget) -> None: ...
|
||||
def post_widget(self, widget: tkinter.Widget, x: int, y: int) -> None: ...
|
||||
|
||||
class Select(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def add(self, name: str, cnf: dict[str, Any] = ..., **kw: Any) -> tkinter.Widget: ...
|
||||
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def add(self, name: str, cnf: dict[str, Any] = ..., **kw) -> tkinter.Widget: ...
|
||||
def invoke(self, name: str) -> None: ...
|
||||
|
||||
class StdButtonBox(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def invoke(self, name: str) -> None: ...
|
||||
|
||||
class DirList(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def chdir(self, dir: str) -> None: ...
|
||||
|
||||
class DirTree(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def chdir(self, dir: str) -> None: ...
|
||||
|
||||
class DirSelectDialog(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def popup(self) -> None: ...
|
||||
def popdown(self) -> None: ...
|
||||
|
||||
class DirSelectBox(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
|
||||
class ExFileSelectBox(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def filter(self) -> None: ...
|
||||
def invoke(self) -> None: ...
|
||||
|
||||
class FileSelectBox(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def apply_filter(self) -> None: ...
|
||||
def invoke(self) -> None: ...
|
||||
|
||||
class FileEntry(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def invoke(self) -> None: ...
|
||||
def file_dialog(self) -> None: ...
|
||||
|
||||
class HList(TixWidget, tkinter.XView, tkinter.YView):
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def add(self, entry: str, cnf: dict[str, Any] = ..., **kw: Any) -> tkinter.Widget: ...
|
||||
def add_child(self, parent: str | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> tkinter.Widget: ...
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def add(self, entry: str, cnf: dict[str, Any] = ..., **kw) -> tkinter.Widget: ...
|
||||
def add_child(self, parent: str | None = ..., cnf: dict[str, Any] = ..., **kw) -> tkinter.Widget: ...
|
||||
def anchor_set(self, entry: str) -> None: ...
|
||||
def anchor_clear(self) -> None: ...
|
||||
# FIXME: Overload, certain combos return, others don't
|
||||
@@ -178,17 +179,17 @@ class HList(TixWidget, tkinter.XView, tkinter.YView):
|
||||
def dragsite_clear(self) -> None: ...
|
||||
def dropsite_set(self, index: int) -> None: ...
|
||||
def dropsite_clear(self) -> None: ...
|
||||
def header_create(self, col: int, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def header_configure(self, col: int, cnf: dict[str, Any] = ..., **kw: Any) -> Any | None: ...
|
||||
def header_cget(self, col: int, opt: Any) -> Any: ...
|
||||
def header_create(self, col: int, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def header_configure(self, col: int, cnf: dict[str, Any] = ..., **kw) -> Incomplete | None: ...
|
||||
def header_cget(self, col: int, opt): ...
|
||||
def header_exists(self, col: int) -> bool: ...
|
||||
def header_exist(self, col: int) -> bool: ...
|
||||
def header_delete(self, col: int) -> None: ...
|
||||
def header_size(self, col: int) -> int: ...
|
||||
def hide_entry(self, entry: str) -> None: ...
|
||||
def indicator_create(self, entry: str, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def indicator_configure(self, entry: str, cnf: dict[str, Any] = ..., **kw: Any) -> Any | None: ...
|
||||
def indicator_cget(self, entry: str, opt: Any) -> Any: ...
|
||||
def indicator_create(self, entry: str, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def indicator_configure(self, entry: str, cnf: dict[str, Any] = ..., **kw) -> Incomplete | None: ...
|
||||
def indicator_cget(self, entry: str, opt): ...
|
||||
def indicator_exists(self, entry: str) -> bool: ...
|
||||
def indicator_delete(self, entry: str) -> None: ...
|
||||
def indicator_size(self, entry: str) -> int: ...
|
||||
@@ -204,22 +205,22 @@ class HList(TixWidget, tkinter.XView, tkinter.YView):
|
||||
def info_parent(self, entry: str) -> str: ...
|
||||
def info_prev(self, entry: str) -> str: ...
|
||||
def info_selection(self) -> tuple[str, ...]: ...
|
||||
def item_cget(self, entry: str, col: int, opt: Any) -> Any: ...
|
||||
def item_configure(self, entry: str, col: int, cnf: dict[str, Any] = ..., **kw: Any) -> Any | None: ...
|
||||
def item_create(self, entry: str, col: int, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def item_cget(self, entry: str, col: int, opt): ...
|
||||
def item_configure(self, entry: str, col: int, cnf: dict[str, Any] = ..., **kw) -> Incomplete | None: ...
|
||||
def item_create(self, entry: str, col: int, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def item_exists(self, entry: str, col: int) -> bool: ...
|
||||
def item_delete(self, entry: str, col: int) -> None: ...
|
||||
def entrycget(self, entry: str, opt: Any) -> Any: ...
|
||||
def entryconfigure(self, entry: str, cnf: dict[str, Any] = ..., **kw: Any) -> Any | None: ...
|
||||
def entrycget(self, entry: str, opt): ...
|
||||
def entryconfigure(self, entry: str, cnf: dict[str, Any] = ..., **kw) -> Incomplete | None: ...
|
||||
def nearest(self, y: int) -> str: ...
|
||||
def see(self, entry: str) -> None: ...
|
||||
def selection_clear(self, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def selection_clear(self, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def selection_includes(self, entry: str) -> bool: ...
|
||||
def selection_set(self, first: str, last: str | None = ...) -> None: ...
|
||||
def show_entry(self, entry: str) -> None: ...
|
||||
|
||||
class CheckList(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def autosetmode(self) -> None: ...
|
||||
def close(self, entrypath: str) -> None: ...
|
||||
def getmode(self, entrypath: str) -> str: ...
|
||||
@@ -229,7 +230,7 @@ class CheckList(TixWidget):
|
||||
def setstatus(self, entrypath: str, mode: str = ...) -> None: ...
|
||||
|
||||
class Tree(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def autosetmode(self) -> None: ...
|
||||
def close(self, entrypath: str) -> None: ...
|
||||
def getmode(self, entrypath: str) -> str: ...
|
||||
@@ -237,7 +238,7 @@ class Tree(TixWidget):
|
||||
def setmode(self, entrypath: str, mode: str = ...) -> None: ...
|
||||
|
||||
class TList(TixWidget, tkinter.XView, tkinter.YView):
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def active_set(self, index: int) -> None: ...
|
||||
def active_clear(self) -> None: ...
|
||||
def anchor_set(self, index: int) -> None: ...
|
||||
@@ -247,7 +248,7 @@ class TList(TixWidget, tkinter.XView, tkinter.YView):
|
||||
def dragsite_clear(self) -> None: ...
|
||||
def dropsite_set(self, index: int) -> None: ...
|
||||
def dropsite_clear(self) -> None: ...
|
||||
def insert(self, index: int, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def insert(self, index: int, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def info_active(self) -> int: ...
|
||||
def info_anchor(self) -> int: ...
|
||||
def info_down(self, index: int) -> int: ...
|
||||
@@ -258,29 +259,29 @@ class TList(TixWidget, tkinter.XView, tkinter.YView):
|
||||
def info_up(self, index: int) -> int: ...
|
||||
def nearest(self, x: int, y: int) -> int: ...
|
||||
def see(self, index: int) -> None: ...
|
||||
def selection_clear(self, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def selection_clear(self, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def selection_includes(self, index: int) -> bool: ...
|
||||
def selection_set(self, first: int, last: int | None = ...) -> None: ...
|
||||
|
||||
class PanedWindow(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def add(self, name: str, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def add(self, name: str, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def delete(self, name: str) -> None: ...
|
||||
def forget(self, name: str) -> None: ... # type: ignore[override]
|
||||
def panecget(self, entry: str, opt: Any) -> Any: ...
|
||||
def paneconfigure(self, entry: str, cnf: dict[str, Any] = ..., **kw: Any) -> Any | None: ...
|
||||
def panecget(self, entry: str, opt): ...
|
||||
def paneconfigure(self, entry: str, cnf: dict[str, Any] = ..., **kw) -> Incomplete | None: ...
|
||||
def panes(self) -> list[tkinter.Widget]: ...
|
||||
|
||||
class ListNoteBook(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def add(self, name: str, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def add(self, name: str, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def page(self, name: str) -> tkinter.Widget: ...
|
||||
def pages(self) -> list[tkinter.Widget]: ...
|
||||
def raise_page(self, name: str) -> None: ...
|
||||
|
||||
class NoteBook(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def add(self, name: str, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def add(self, name: str, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def delete(self, name: str) -> None: ...
|
||||
def page(self, name: str) -> tkinter.Widget: ...
|
||||
def pages(self) -> list[tkinter.Widget]: ...
|
||||
@@ -288,14 +289,14 @@ class NoteBook(TixWidget):
|
||||
def raised(self) -> bool: ...
|
||||
|
||||
class InputOnly(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
|
||||
class Form:
|
||||
def __setitem__(self, key: str, value: Any) -> None: ...
|
||||
def config(self, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def form(self, cnf: dict[str, Any] = ..., **kw: Any) -> None: ...
|
||||
def config(self, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def form(self, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def check(self) -> bool: ...
|
||||
def forget(self) -> None: ...
|
||||
def grid(self, xsize: int = ..., ysize: int = ...) -> tuple[int, int] | None: ...
|
||||
def info(self, option: str | None = ...) -> Any: ...
|
||||
def info(self, option: str | None = ...): ...
|
||||
def slaves(self) -> list[tkinter.Widget]: ...
|
||||
|
||||
Reference in New Issue
Block a user