Use variable annotations everywhere (#2909)

This commit is contained in:
Michael Lee
2019-04-13 01:40:52 -07:00
committed by Sebastian Rittau
parent b3c76aab49
commit efb67946f8
458 changed files with 9135 additions and 9135 deletions

View File

@@ -2,13 +2,13 @@ from types import TracebackType
from typing import Any, Optional, Dict, Callable, Type
from tkinter.constants import * # noqa: F403
TclError = ... # type: Any
wantobjects = ... # type: Any
TkVersion = ... # type: Any
TclVersion = ... # type: Any
READABLE = ... # type: Any
WRITABLE = ... # type: Any
EXCEPTION = ... # type: Any
TclError: Any
wantobjects: Any
TkVersion: Any
TclVersion: Any
READABLE: Any
WRITABLE: Any
EXCEPTION: Any
class Event: ...
@@ -18,10 +18,10 @@ class Variable:
def __init__(self, master: Optional[Any] = ..., value: Optional[Any] = ..., name: Optional[Any] = ...): ...
def __del__(self): ...
def set(self, value): ...
initialize = ... # type: Any
initialize: Any
def get(self): ...
def trace_variable(self, mode, callback): ...
trace = ... # type: Any
trace: Any
def trace_vdelete(self, mode, cbname): ...
def trace_vinfo(self): ...
def __eq__(self, other): ...
@@ -41,13 +41,13 @@ class DoubleVar(Variable):
class BooleanVar(Variable):
def __init__(self, master: Optional[Any] = ..., value: Optional[Any] = ..., name: Optional[Any] = ...): ...
def set(self, value): ...
initialize = ... # type: Any
initialize: Any
def get(self): ...
def mainloop(n: int = ...): ...
getint = ... # type: Any
getdouble = ... # type: Any
getint: Any
getdouble: Any
def getboolean(s): ...
@@ -59,7 +59,7 @@ class Misc:
def tk_setPalette(self, *args, **kw): ...
def tk_menuBar(self, *args): ...
def wait_variable(self, name: str = ...): ...
waitvar = ... # type: Any
waitvar: Any
def wait_window(self, window: Optional[Any] = ...): ...
def wait_visibility(self, window: Optional[Any] = ...): ...
def setvar(self, name: str = ..., value: str = ...): ...
@@ -68,7 +68,7 @@ class Misc:
def getdouble(self, s): ...
def getboolean(self, s): ...
def focus_set(self): ...
focus = ... # type: Any
focus: Any
def focus_force(self): ...
def focus_get(self): ...
def focus_displayof(self): ...
@@ -100,7 +100,7 @@ class Misc:
def send(self, interp, cmd, *args): ...
def lower(self, belowThis: Optional[Any] = ...): ...
def tkraise(self, aboveThis: Optional[Any] = ...): ...
lift = ... # type: Any
lift: Any
def winfo_atom(self, name, displayof: int = ...): ...
def winfo_atomname(self, id, displayof: int = ...): ...
def winfo_cells(self): ...
@@ -162,31 +162,31 @@ class Misc:
def mainloop(self, n: int = ...): ...
def quit(self): ...
def nametowidget(self, name): ...
register = ... # type: Any
register: Any
def configure(self, cnf: Optional[Any] = ..., **kw): ...
config = ... # type: Any
config: Any
def cget(self, key): ...
__getitem__ = ... # type: Any
__getitem__: Any
def __setitem__(self, key, value): ...
def keys(self): ...
def pack_propagate(self, flag=...): ...
propagate = ... # type: Any
propagate: Any
def pack_slaves(self): ...
slaves = ... # type: Any
slaves: Any
def place_slaves(self): ...
def grid_anchor(self, anchor: Optional[Any] = ...): ...
anchor = ... # type: Any
anchor: Any
def grid_bbox(self, column: Optional[Any] = ..., row: Optional[Any] = ..., col2: Optional[Any] = ...,
row2: Optional[Any] = ...): ...
bbox = ... # type: Any
bbox: Any
def grid_columnconfigure(self, index, cnf=..., **kw): ...
columnconfigure = ... # type: Any
columnconfigure: Any
def grid_location(self, x, y): ...
def grid_propagate(self, flag=...): ...
def grid_rowconfigure(self, index, cnf=..., **kw): ...
rowconfigure = ... # type: Any
rowconfigure: Any
def grid_size(self): ...
size = ... # type: Any
size: Any
def grid_slaves(self, row: Optional[Any] = ..., column: Optional[Any] = ...): ...
def event_add(self, virtual, *sequences): ...
def event_delete(self, virtual, *sequences): ...
@@ -196,9 +196,9 @@ class Misc:
def image_types(self): ...
class CallWrapper:
func = ... # type: Any
subst = ... # type: Any
widget = ... # type: Any
func: Any
subst: Any
widget: Any
def __init__(self, func, subst, widget): ...
def __call__(self, *args): ...
@@ -215,68 +215,68 @@ class YView:
class Wm:
def wm_aspect(self, minNumer: Optional[Any] = ..., minDenom: Optional[Any] = ..., maxNumer: Optional[Any] = ...,
maxDenom: Optional[Any] = ...): ...
aspect = ... # type: Any
aspect: Any
def wm_attributes(self, *args): ...
attributes = ... # type: Any
attributes: Any
def wm_client(self, name: Optional[Any] = ...): ...
client = ... # type: Any
client: Any
def wm_colormapwindows(self, *wlist): ...
colormapwindows = ... # type: Any
colormapwindows: Any
def wm_command(self, value: Optional[Any] = ...): ...
command = ... # type: Any
command: Any
def wm_deiconify(self): ...
deiconify = ... # type: Any
deiconify: Any
def wm_focusmodel(self, model: Optional[Any] = ...): ...
focusmodel = ... # type: Any
focusmodel: Any
def wm_forget(self, window): ...
forget = ... # type: Any
forget: Any
def wm_frame(self): ...
frame = ... # type: Any
frame: Any
def wm_geometry(self, newGeometry: Optional[Any] = ...): ...
geometry = ... # type: Any
geometry: Any
def wm_grid(self, baseWidth: Optional[Any] = ..., baseHeight: Optional[Any] = ..., widthInc: Optional[Any] = ...,
heightInc: Optional[Any] = ...): ...
grid = ... # type: Any
grid: Any
def wm_group(self, pathName: Optional[Any] = ...): ...
group = ... # type: Any
group: Any
def wm_iconbitmap(self, bitmap: Optional[Any] = ..., default: Optional[Any] = ...): ...
iconbitmap = ... # type: Any
iconbitmap: Any
def wm_iconify(self): ...
iconify = ... # type: Any
iconify: Any
def wm_iconmask(self, bitmap: Optional[Any] = ...): ...
iconmask = ... # type: Any
iconmask: Any
def wm_iconname(self, newName: Optional[Any] = ...): ...
iconname = ... # type: Any
iconname: Any
def wm_iconphoto(self, default: bool = ..., *args): ...
iconphoto = ... # type: Any
iconphoto: Any
def wm_iconposition(self, x: Optional[Any] = ..., y: Optional[Any] = ...): ...
iconposition = ... # type: Any
iconposition: Any
def wm_iconwindow(self, pathName: Optional[Any] = ...): ...
iconwindow = ... # type: Any
iconwindow: Any
def wm_manage(self, widget): ...
manage = ... # type: Any
manage: Any
def wm_maxsize(self, width: Optional[Any] = ..., height: Optional[Any] = ...): ...
maxsize = ... # type: Any
maxsize: Any
def wm_minsize(self, width: Optional[Any] = ..., height: Optional[Any] = ...): ...
minsize = ... # type: Any
minsize: Any
def wm_overrideredirect(self, boolean: Optional[Any] = ...): ...
overrideredirect = ... # type: Any
overrideredirect: Any
def wm_positionfrom(self, who: Optional[Any] = ...): ...
positionfrom = ... # type: Any
positionfrom: Any
def wm_protocol(self, name: Optional[Any] = ..., func: Optional[Any] = ...): ...
protocol = ... # type: Any
protocol: Any
def wm_resizable(self, width: Optional[Any] = ..., height: Optional[Any] = ...): ...
resizable = ... # type: Any
resizable: Any
def wm_sizefrom(self, who: Optional[Any] = ...): ...
sizefrom = ... # type: Any
sizefrom: Any
def wm_state(self, newstate: Optional[Any] = ...): ...
state = ... # type: Any
state: Any
def wm_title(self, string: Optional[Any] = ...): ...
title = ... # type: Any
title: Any
def wm_transient(self, master: Optional[Any] = ...): ...
transient = ... # type: Any
transient: Any
def wm_withdraw(self): ...
withdraw = ... # type: Any
withdraw: Any
class Tk(Misc, Wm):
master: Optional[Any]
@@ -294,41 +294,41 @@ def Tcl(screenName: Optional[Any] = ..., baseName: Optional[Any] = ..., classNam
class Pack:
def pack_configure(self, cnf=..., **kw): ...
pack = ... # type: Any
pack: Any
def pack_forget(self): ...
forget = ... # type: Any
forget: Any
def pack_info(self): ...
info = ... # type: Any
propagate = ... # type: Any
slaves = ... # type: Any
info: Any
propagate: Any
slaves: Any
class Place:
def place_configure(self, cnf=..., **kw): ...
place = ... # type: Any
place: Any
def place_forget(self): ...
forget = ... # type: Any
forget: Any
def place_info(self): ...
info = ... # type: Any
slaves = ... # type: Any
info: Any
slaves: Any
class Grid:
def grid_configure(self, cnf=..., **kw): ...
grid = ... # type: Any
bbox = ... # type: Any
columnconfigure = ... # type: Any
grid: Any
bbox: Any
columnconfigure: Any
def grid_forget(self): ...
forget = ... # type: Any
forget: Any
def grid_remove(self): ...
def grid_info(self): ...
info = ... # type: Any
location = ... # type: Any
propagate = ... # type: Any
rowconfigure = ... # type: Any
size = ... # type: Any
slaves = ... # type: Any
info: Any
location: Any
propagate: Any
rowconfigure: Any
size: Any
slaves: Any
class BaseWidget(Misc):
widgetName = ... # type: Any
widgetName: Any
def __init__(self, master, widgetName, cnf=..., kw=..., extra=...): ...
def destroy(self): ...
@@ -385,13 +385,13 @@ class Canvas(Widget, XView, YView):
def insert(self, *args): ...
def itemcget(self, tagOrId, option): ...
def itemconfigure(self, tagOrId, cnf: Optional[Any] = ..., **kw): ...
itemconfig = ... # type: Any
itemconfig: Any
def tag_lower(self, *args): ...
lower = ... # type: Any
lower: Any
def move(self, *args): ...
def postscript(self, cnf=..., **kw): ...
def tag_raise(self, *args): ...
lift = ... # type: Any
lift: Any
def scale(self, *args): ...
def scan_mark(self, x, y): ...
def scan_dragto(self, x, y, gain: int = ...): ...
@@ -420,17 +420,17 @@ class Entry(Widget, XView):
def scan_mark(self, x): ...
def scan_dragto(self, x): ...
def selection_adjust(self, index): ...
select_adjust = ... # type: Any
select_adjust: Any
def selection_clear(self): ...
select_clear = ... # type: Any
select_clear: Any
def selection_from(self, index): ...
select_from = ... # type: Any
select_from: Any
def selection_present(self): ...
select_present = ... # type: Any
select_present: Any
def selection_range(self, start, end): ...
select_range = ... # type: Any
select_range: Any
def selection_to(self, index): ...
select_to = ... # type: Any
select_to: Any
class Frame(Widget):
def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ...
@@ -452,17 +452,17 @@ class Listbox(Widget, XView, YView):
def scan_dragto(self, x, y): ...
def see(self, index): ...
def selection_anchor(self, index): ...
select_anchor = ... # type: Any
select_anchor: Any
def selection_clear(self, first, last: Optional[Any] = ...): ... # type: ignore
select_clear = ... # type: Any
select_clear: Any
def selection_includes(self, index): ...
select_includes = ... # type: Any
select_includes: Any
def selection_set(self, first, last: Optional[Any] = ...): ...
select_set = ... # type: Any
select_set: Any
def size(self): ...
def itemcget(self, index, option): ...
def itemconfigure(self, index, cnf: Optional[Any] = ..., **kw): ...
itemconfig = ... # type: Any
itemconfig: Any
class Menu(Widget):
def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ...
@@ -484,7 +484,7 @@ class Menu(Widget):
def delete(self, index1, index2: Optional[Any] = ...): ...
def entrycget(self, index, option): ...
def entryconfigure(self, index, cnf: Optional[Any] = ..., **kw): ...
entryconfig = ... # type: Any
entryconfig: Any
def index(self, index): ...
def invoke(self, index): ...
def post(self, x, y): ...
@@ -564,7 +564,7 @@ class Text(Widget, XView, YView):
def tag_bind(self, tagName, sequence, func, add: Optional[Any] = ...): ...
def tag_cget(self, tagName, option): ...
def tag_configure(self, tagName, cnf: Optional[Any] = ..., **kw): ...
tag_config = ... # type: Any
tag_config: Any
def tag_delete(self, *tagNames): ...
def tag_lower(self, tagName, belowThis: Optional[Any] = ...): ...
def tag_names(self, index: Optional[Any] = ...): ...
@@ -575,7 +575,7 @@ class Text(Widget, XView, YView):
def tag_remove(self, tagName, index1, index2: Optional[Any] = ...): ...
def window_cget(self, index, option): ...
def window_configure(self, index, cnf: Optional[Any] = ..., **kw): ...
window_config = ... # type: Any
window_config: Any
def window_create(self, index, cnf=..., **kw): ...
def window_names(self): ...
def yview_pickplace(self, *what): ...
@@ -585,21 +585,21 @@ class _setit:
def __call__(self, *args): ...
class OptionMenu(Menubutton):
widgetName = ... # type: Any
menuname = ... # type: Any
widgetName: Any
menuname: Any
def __init__(self, master, variable, value, *values, **kwargs): ...
def __getitem__(self, name): ...
def destroy(self): ...
class Image:
name = ... # type: Any
tk = ... # type: Any
name: Any
tk: Any
def __init__(self, imgtype, name: Optional[Any] = ..., cnf=..., master: Optional[Any] = ..., **kw): ...
def __del__(self): ...
def __setitem__(self, key, value): ...
def __getitem__(self, key): ...
def configure(self, **kw): ...
config = ... # type: Any
config: Any
def height(self): ...
def type(self): ...
def width(self): ...
@@ -647,7 +647,7 @@ class PanedWindow(Widget):
def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ...
def add(self, child, **kw): ...
def remove(self, child): ...
forget = ... # type: Any
forget: Any
def identify(self, x, y): ...
def proxy(self, *args): ...
def proxy_coord(self): ...
@@ -659,5 +659,5 @@ class PanedWindow(Widget):
def sash_place(self, index, x, y): ...
def panecget(self, child, option): ...
def paneconfigure(self, tagOrId, cnf: Optional[Any] = ..., **kw): ...
paneconfig = ... # type: Any
paneconfig: Any
def panes(self): ...

View File

@@ -1,79 +1,79 @@
from typing import Any
NO = ... # type: Any
YES = ... # type: Any
TRUE = ... # type: Any
FALSE = ... # type: Any
ON = ... # type: Any
OFF = ... # type: Any
N = ... # type: Any
S = ... # type: Any
W = ... # type: Any
E = ... # type: Any
NW = ... # type: Any
SW = ... # type: Any
NE = ... # type: Any
SE = ... # type: Any
NS = ... # type: Any
EW = ... # type: Any
NSEW = ... # type: Any
CENTER = ... # type: Any
NONE = ... # type: Any
X = ... # type: Any
Y = ... # type: Any
BOTH = ... # type: Any
LEFT = ... # type: Any
TOP = ... # type: Any
RIGHT = ... # type: Any
BOTTOM = ... # type: Any
RAISED = ... # type: Any
SUNKEN = ... # type: Any
FLAT = ... # type: Any
RIDGE = ... # type: Any
GROOVE = ... # type: Any
SOLID = ... # type: Any
HORIZONTAL = ... # type: Any
VERTICAL = ... # type: Any
NUMERIC = ... # type: Any
CHAR = ... # type: Any
WORD = ... # type: Any
BASELINE = ... # type: Any
INSIDE = ... # type: Any
OUTSIDE = ... # type: Any
SEL = ... # type: Any
SEL_FIRST = ... # type: Any
SEL_LAST = ... # type: Any
END = ... # type: Any
INSERT = ... # type: Any
CURRENT = ... # type: Any
ANCHOR = ... # type: Any
ALL = ... # type: Any
NORMAL = ... # type: Any
DISABLED = ... # type: Any
ACTIVE = ... # type: Any
HIDDEN = ... # type: Any
CASCADE = ... # type: Any
CHECKBUTTON = ... # type: Any
COMMAND = ... # type: Any
RADIOBUTTON = ... # type: Any
SEPARATOR = ... # type: Any
SINGLE = ... # type: Any
BROWSE = ... # type: Any
MULTIPLE = ... # type: Any
EXTENDED = ... # type: Any
DOTBOX = ... # type: Any
UNDERLINE = ... # type: Any
PIESLICE = ... # type: Any
CHORD = ... # type: Any
ARC = ... # type: Any
FIRST = ... # type: Any
LAST = ... # type: Any
BUTT = ... # type: Any
PROJECTING = ... # type: Any
ROUND = ... # type: Any
BEVEL = ... # type: Any
MITER = ... # type: Any
MOVETO = ... # type: Any
SCROLL = ... # type: Any
UNITS = ... # type: Any
PAGES = ... # type: Any
NO: Any
YES: Any
TRUE: Any
FALSE: Any
ON: Any
OFF: Any
N: Any
S: Any
W: Any
E: Any
NW: Any
SW: Any
NE: Any
SE: Any
NS: Any
EW: Any
NSEW: Any
CENTER: Any
NONE: Any
X: Any
Y: Any
BOTH: Any
LEFT: Any
TOP: Any
RIGHT: Any
BOTTOM: Any
RAISED: Any
SUNKEN: Any
FLAT: Any
RIDGE: Any
GROOVE: Any
SOLID: Any
HORIZONTAL: Any
VERTICAL: Any
NUMERIC: Any
CHAR: Any
WORD: Any
BASELINE: Any
INSIDE: Any
OUTSIDE: Any
SEL: Any
SEL_FIRST: Any
SEL_LAST: Any
END: Any
INSERT: Any
CURRENT: Any
ANCHOR: Any
ALL: Any
NORMAL: Any
DISABLED: Any
ACTIVE: Any
HIDDEN: Any
CASCADE: Any
CHECKBUTTON: Any
COMMAND: Any
RADIOBUTTON: Any
SEPARATOR: Any
SINGLE: Any
BROWSE: Any
MULTIPLE: Any
EXTENDED: Any
DOTBOX: Any
UNDERLINE: Any
PIESLICE: Any
CHORD: Any
ARC: Any
FIRST: Any
LAST: Any
BUTT: Any
PROJECTING: Any
ROUND: Any
BEVEL: Any
MITER: Any
MOVETO: Any
SCROLL: Any
UNITS: Any
PAGES: Any

View File

@@ -6,8 +6,8 @@ def tclobjs_to_py(adict): ...
def setup_master(master: Optional[Any] = ...): ...
class Style:
master = ... # type: Any
tk = ... # type: Any
master: Any
tk: Any
def __init__(self, master: Optional[Any] = ...): ...
def configure(self, style, query_opt: Optional[Any] = ..., **kw): ...
def map(self, style, query_opt: Optional[Any] = ..., **kw): ...
@@ -55,7 +55,7 @@ class Label(Widget):
class Labelframe(Widget):
def __init__(self, master: Optional[Any] = ..., **kw): ...
LabelFrame = ... # type: Any
LabelFrame: Any
class Menubutton(Widget):
def __init__(self, master: Optional[Any] = ..., **kw): ...
@@ -75,12 +75,12 @@ class Notebook(Widget):
class Panedwindow(Widget, tkinter.PanedWindow):
def __init__(self, master: Optional[Any] = ..., **kw): ...
forget = ... # type: Any
forget: Any
def insert(self, pos, child, **kw): ...
def pane(self, pane, option: Optional[Any] = ..., **kw): ...
def sashpos(self, index, newpos: Optional[Any] = ...): ...
PanedWindow = ... # type: Any
PanedWindow: Any
class Progressbar(Widget):
def __init__(self, master: Optional[Any] = ..., **kw): ...
@@ -131,7 +131,7 @@ class Treeview(Widget, tkinter.XView, tkinter.YView):
def insert(self, parent, index, iid: Optional[Any] = ..., **kw): ...
def item(self, item, option: Optional[Any] = ..., **kw): ...
def move(self, item, parent, index): ...
reattach = ... # type: Any
reattach: Any
def next(self, item): ...
def parent(self, item): ...
def prev(self, item): ...
@@ -147,11 +147,11 @@ class Treeview(Widget, tkinter.XView, tkinter.YView):
def tag_has(self, tagname, item: Optional[Any] = ...): ...
class LabeledScale(Frame):
label = ... # type: Any
scale = ... # type: Any
label: Any
scale: Any
def __init__(self, master: Optional[Any] = ..., variable: Optional[Any] = ..., from_: int = ..., to: int = ..., **kw): ...
def destroy(self): ...
value = ... # type: Any
value: Any
class OptionMenu(Menubutton):
def __init__(self, master, variable, default: Optional[Any] = ..., *values, **kwargs): ...