Skip to content

finish types of tkinter.Menu #5583

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 17 additions & 15 deletions stdlib/tkinter/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1841,10 +1841,10 @@ class Menu(Widget):
@overload
def configure(self, cnf: str) -> Tuple[str, str, str, Any, Any]: ...
config = configure
def tk_popup(self, x: int, y: int, entry: _MenuIndex = ...): ...
def activate(self, index): ...
def add(self, itemType, cnf=..., **kw): ...
def insert(self, index, itemType, cnf=..., **kw): ...
def tk_popup(self, x: int, y: int, entry: _MenuIndex = ...) -> None: ...
def activate(self, index: _MenuIndex) -> None: ...
def add(self, itemType, cnf=..., **kw): ... # docstring says "Internal function."
def insert(self, index, itemType, cnf=..., **kw): ... # docstring says "Internal function."
def add_cascade(
self,
cnf: Optional[Dict[str, Any]] = ...,
Expand Down Expand Up @@ -2035,17 +2035,19 @@ class Menu(Widget):
variable: Variable = ...,
) -> None: ...
def insert_separator(self, index: _MenuIndex, cnf: Optional[Dict[str, Any]] = ..., *, background: _Color = ...) -> None: ...
def delete(self, index1, index2: Optional[Any] = ...): ...
def entrycget(self, index, option): ...
def entryconfigure(self, index, cnf: Optional[Any] = ..., **kw): ...
entryconfig: Any
def index(self, index): ...
def invoke(self, index): ...
def post(self, x, y): ...
def type(self, index): ...
def unpost(self): ...
def xposition(self, index): ...
def yposition(self, index): ...
def delete(self, index1: _MenuIndex, index2: _MenuIndex | None = ...) -> None: ...
def entrycget(self, index: _MenuIndex, option: str) -> Any: ...
def entryconfigure(
self, index: _MenuIndex, cnf: dict[str, Any] | None = ..., **kw: Any
) -> dict[str, Tuple[str, str, str, Any, Any]] | None: ...
entryconfig = entryconfigure
def index(self, index: _MenuIndex) -> int | None: ...
def invoke(self, index: _MenuIndex) -> Any: ...
def post(self, x: int, y: int) -> None: ...
def type(self, index: _MenuIndex) -> Literal["cascade", "checkbutton", "command", "radiobutton", "separator"]: ...
def unpost(self) -> None: ...
def xposition(self, index: _MenuIndex) -> int: ...
def yposition(self, index: _MenuIndex) -> int: ...

class Menubutton(Widget):
def __init__(
Expand Down