mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-30 06:35:22 +08:00
Add more defaults to the stdlib (#9606)
Continuing work towards #8988. The first five commits were created using stubdefaulter on various Python versions; the following commits were all created manually by me to fix various problems. The main things this adds that weren't present in #9501 are: - Defaults in Windows-only modules and Windows-only branches (because I'm running a Windows machine) - Defaults in non-py311 branches - Defaults for float parameters - Defaults for overloads
This commit is contained in:
@@ -38,22 +38,22 @@ TCL_ALL_EVENTS: Literal[0]
|
||||
class tixCommand:
|
||||
def tix_addbitmapdir(self, directory: str) -> None: ...
|
||||
def tix_cget(self, option: str) -> Any: ...
|
||||
def tix_configure(self, cnf: dict[str, Any] | None = ..., **kw: Any) -> Any: ...
|
||||
def tix_filedialog(self, dlgclass: str | None = ...) -> str: ...
|
||||
def tix_configure(self, cnf: dict[str, Any] | None = None, **kw: Any) -> Any: ...
|
||||
def tix_filedialog(self, dlgclass: str | None = None) -> str: ...
|
||||
def tix_getbitmap(self, name: str) -> str: ...
|
||||
def tix_getimage(self, name: str) -> str: ...
|
||||
def tix_option_get(self, name: str) -> Any: ...
|
||||
def tix_resetoptions(self, newScheme: str, newFontSet: str, newScmPrio: str | None = ...) -> None: ...
|
||||
def tix_resetoptions(self, newScheme: str, newFontSet: str, newScmPrio: str | None = None) -> None: ...
|
||||
|
||||
class Tk(tkinter.Tk, tixCommand):
|
||||
def __init__(self, screenName: str | None = ..., baseName: str | None = ..., className: str = ...) -> None: ...
|
||||
def __init__(self, screenName: str | None = None, baseName: str | None = None, className: str = "Tix") -> None: ...
|
||||
|
||||
class TixWidget(tkinter.Widget):
|
||||
def __init__(
|
||||
self,
|
||||
master: tkinter.Misc | None = ...,
|
||||
widgetName: str | None = ...,
|
||||
static_options: list[str] | None = ...,
|
||||
master: tkinter.Misc | None = None,
|
||||
widgetName: str | None = None,
|
||||
static_options: list[str] | None = None,
|
||||
cnf: dict[str, Any] = ...,
|
||||
kw: dict[str, Any] = ...,
|
||||
) -> None: ...
|
||||
@@ -62,52 +62,50 @@ class TixWidget(tkinter.Widget):
|
||||
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) -> None: ...
|
||||
def image_create(self, imgtype: str, cnf: dict[str, Any] = ..., master: tkinter.Widget | None = None, **kw) -> None: ...
|
||||
def image_delete(self, imgname: str) -> None: ...
|
||||
|
||||
class TixSubWidget(TixWidget):
|
||||
def __init__(
|
||||
self, master: tkinter.Widget, name: str, destroy_physically: int = ..., check_intermediate: int = ...
|
||||
) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget, name: str, destroy_physically: int = 1, check_intermediate: int = 1) -> None: ...
|
||||
|
||||
class DisplayStyle:
|
||||
def __init__(self, itemtype: str, cnf: dict[str, Any] = ..., *, master: tkinter.Widget | None = ..., **kw) -> None: ...
|
||||
def __init__(self, itemtype: str, cnf: dict[str, Any] = ..., *, master: tkinter.Widget | None = 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): ...
|
||||
|
||||
class Balloon(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None = 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) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None = 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) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None = 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) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None = 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) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
|
||||
class LabelFrame(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
|
||||
class Meter(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
|
||||
class OptionMenu(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
@@ -129,7 +127,7 @@ class Select(TixWidget):
|
||||
def invoke(self, name: str) -> None: ...
|
||||
|
||||
class StdButtonBox(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def invoke(self, name: str) -> None: ...
|
||||
|
||||
class DirList(TixWidget):
|
||||
@@ -164,13 +162,13 @@ class FileEntry(TixWidget):
|
||||
def file_dialog(self) -> None: ...
|
||||
|
||||
class HList(TixWidget, tkinter.XView, tkinter.YView):
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None = 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 add_child(self, parent: str | None = 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
|
||||
def column_width(self, col: int = ..., width: int | None = ..., chars: int | None = ...) -> int | None: ...
|
||||
def column_width(self, col: int = 0, width: int | None = None, chars: int | None = None) -> int | None: ...
|
||||
def delete_all(self) -> None: ...
|
||||
def delete_entry(self, entry: str) -> None: ...
|
||||
def delete_offsprings(self, entry: str) -> None: ...
|
||||
@@ -195,7 +193,7 @@ class HList(TixWidget, tkinter.XView, tkinter.YView):
|
||||
def indicator_size(self, entry: str) -> int: ...
|
||||
def info_anchor(self) -> str: ...
|
||||
def info_bbox(self, entry: str) -> tuple[int, int, int, int]: ...
|
||||
def info_children(self, entry: str | None = ...) -> tuple[str, ...]: ...
|
||||
def info_children(self, entry: str | None = None) -> tuple[str, ...]: ...
|
||||
def info_data(self, entry: str) -> Any: ...
|
||||
def info_dragsite(self) -> str: ...
|
||||
def info_dropsite(self) -> str: ...
|
||||
@@ -216,34 +214,34 @@ class HList(TixWidget, tkinter.XView, tkinter.YView):
|
||||
def see(self, entry: str) -> 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 selection_set(self, first: str, last: str | None = None) -> None: ...
|
||||
def show_entry(self, entry: str) -> None: ...
|
||||
|
||||
class CheckList(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def autosetmode(self) -> None: ...
|
||||
def close(self, entrypath: str) -> None: ...
|
||||
def getmode(self, entrypath: str) -> str: ...
|
||||
def open(self, entrypath: str) -> None: ...
|
||||
def getselection(self, mode: str = ...) -> tuple[str, ...]: ...
|
||||
def getselection(self, mode: str = "on") -> tuple[str, ...]: ...
|
||||
def getstatus(self, entrypath: str) -> str: ...
|
||||
def setstatus(self, entrypath: str, mode: str = ...) -> None: ...
|
||||
def setstatus(self, entrypath: str, mode: str = "on") -> None: ...
|
||||
|
||||
class Tree(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def autosetmode(self) -> None: ...
|
||||
def close(self, entrypath: str) -> None: ...
|
||||
def getmode(self, entrypath: str) -> str: ...
|
||||
def open(self, entrypath: str) -> None: ...
|
||||
def setmode(self, entrypath: str, mode: str = ...) -> None: ...
|
||||
def setmode(self, entrypath: str, mode: str = "none") -> None: ...
|
||||
|
||||
class TList(TixWidget, tkinter.XView, tkinter.YView):
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None = 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: ...
|
||||
def anchor_clear(self) -> None: ...
|
||||
def delete(self, from_: int, to: int | None = ...) -> None: ...
|
||||
def delete(self, from_: int, to: int | None = None) -> None: ...
|
||||
def dragsite_set(self, index: int) -> None: ...
|
||||
def dragsite_clear(self) -> None: ...
|
||||
def dropsite_set(self, index: int) -> None: ...
|
||||
@@ -261,7 +259,7 @@ class TList(TixWidget, tkinter.XView, tkinter.YView):
|
||||
def see(self, index: int) -> 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: ...
|
||||
def selection_set(self, first: int, last: int | None = None) -> None: ...
|
||||
|
||||
class PanedWindow(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
@@ -280,7 +278,7 @@ class ListNoteBook(TixWidget):
|
||||
def raise_page(self, name: str) -> None: ...
|
||||
|
||||
class NoteBook(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None = 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: ...
|
||||
@@ -289,7 +287,7 @@ class NoteBook(TixWidget):
|
||||
def raised(self) -> bool: ...
|
||||
|
||||
class InputOnly(TixWidget):
|
||||
def __init__(self, master: tkinter.Widget | None = ..., cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
def __init__(self, master: tkinter.Widget | None = None, cnf: dict[str, Any] = ..., **kw) -> None: ...
|
||||
|
||||
class Form:
|
||||
def __setitem__(self, key: str, value: Any) -> None: ...
|
||||
@@ -297,6 +295,6 @@ class Form:
|
||||
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 = ...): ...
|
||||
def grid(self, xsize: int = 0, ysize: int = 0) -> tuple[int, int] | None: ...
|
||||
def info(self, option: str | None = None): ...
|
||||
def slaves(self) -> list[tkinter.Widget]: ...
|
||||
|
||||
Reference in New Issue
Block a user