-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Use typeshed.Incomplete and object instead of Any in tkinter stubs #8458
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
Changes from 9 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
9e26c33
Use Incomplete in tkinter stubs
Akuli 82b2a93
pyclean go brr
Akuli e594fa3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 86f1652
pyright ignores
Akuli 621ed21
Merge branch 'tk-incomplete' of https://github.com/Akuli/typeshed int…
Akuli edc173e
Don't touch cnf arguments
Akuli ee20c75
Apply suggestions from code review
Akuli e4304f6
Merge remote-tracking branch 'me/tk-incomplete' into tk-incomplete
Akuli 3c70dce
Update stdlib/tkinter/__init__.pyi
Akuli c803959
Update stdlib/tkinter/__init__.pyi
Akuli 9101e52
Update stdlib/tkinter/__init__.pyi
Akuli 07e676a
Delete remaining unnecessary Incompletes
Akuli 626542a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import sys | ||
from tkinter.commondialog import Dialog | ||
from typing import Any, ClassVar | ||
from typing import ClassVar | ||
|
||
if sys.version_info >= (3, 9): | ||
__all__ = ["Chooser", "askcolor"] | ||
|
||
class Chooser(Dialog): | ||
command: ClassVar[str] | ||
|
||
def askcolor(color: str | bytes | None = ..., **options: Any) -> tuple[None, None] | tuple[tuple[float, float, float], str]: ... | ||
def askcolor(color: str | bytes | None = ..., **options) -> tuple[None, None] | tuple[tuple[float, float, float], str]: ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
import sys | ||
from _typeshed import Incomplete | ||
from collections.abc import Mapping | ||
from typing import Any, ClassVar | ||
from typing import ClassVar | ||
|
||
if sys.version_info >= (3, 9): | ||
__all__ = ["Dialog"] | ||
|
||
class Dialog: | ||
command: ClassVar[str | None] | ||
master: Any | None | ||
options: Mapping[str, Any] | ||
def __init__(self, master: Any | None = ..., **options) -> None: ... | ||
def show(self, **options) -> Any: ... | ||
master: Incomplete | None | ||
options: Mapping[str, Incomplete] | ||
def __init__(self, master: Incomplete | None = ..., **options) -> None: ... | ||
def show(self, **options): ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
from tkinter import Frame, Misc, Scrollbar, Text | ||
from typing import Any | ||
|
||
__all__ = ["ScrolledText"] | ||
|
||
# The methods from Pack, Place, and Grid are dynamically added over the parent's impls | ||
class ScrolledText(Text): | ||
frame: Frame | ||
vbar: Scrollbar | ||
def __init__(self, master: Misc | None = ..., **kwargs: Any) -> None: ... | ||
def __init__(self, master: Misc | None = ..., **kwargs) -> None: ... |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.