mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Use MaybeNone (alias to Any) when applicable (#12855)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import _tkinter
|
||||
import sys
|
||||
from _typeshed import Incomplete, StrEnum, StrOrBytesPath
|
||||
from _typeshed import Incomplete, MaybeNone, StrEnum, StrOrBytesPath
|
||||
from collections.abc import Callable, Iterable, Mapping, Sequence
|
||||
from tkinter.constants import *
|
||||
from tkinter.font import _FontDescription
|
||||
@@ -509,7 +509,7 @@ class Misc:
|
||||
pad: _ScreenUnits = ...,
|
||||
uniform: str = ...,
|
||||
weight: int = ...,
|
||||
) -> _GridIndexInfo | Any: ... # can be None but annoying to check
|
||||
) -> _GridIndexInfo | MaybeNone: ... # can be None but annoying to check
|
||||
def grid_rowconfigure(
|
||||
self,
|
||||
index: int | str | list[int] | tuple[int, ...],
|
||||
@@ -519,7 +519,7 @@ class Misc:
|
||||
pad: _ScreenUnits = ...,
|
||||
uniform: str = ...,
|
||||
weight: int = ...,
|
||||
) -> _GridIndexInfo | Any: ... # can be None but annoying to check
|
||||
) -> _GridIndexInfo | MaybeNone: ... # can be None but annoying to check
|
||||
columnconfigure = grid_columnconfigure
|
||||
rowconfigure = grid_rowconfigure
|
||||
def grid_location(self, x: _ScreenUnits, y: _ScreenUnits) -> tuple[int, int]: ...
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import _tkinter
|
||||
import tkinter
|
||||
from _typeshed import Incomplete
|
||||
from _typeshed import Incomplete, MaybeNone
|
||||
from collections.abc import Callable
|
||||
from tkinter.font import _FontDescription
|
||||
from typing import Any, Literal, TypedDict, overload
|
||||
@@ -1156,7 +1156,7 @@ class Treeview(Widget, tkinter.XView, tkinter.YView):
|
||||
background: str = ...,
|
||||
font: _FontDescription = ...,
|
||||
image: tkinter._ImageSpec = ...,
|
||||
) -> _TreeviewTagDict | Any: ... # can be None but annoying to check
|
||||
) -> _TreeviewTagDict | MaybeNone: ... # can be None but annoying to check
|
||||
@overload
|
||||
def tag_has(self, tagname: str, item: None = None) -> tuple[str, ...]: ...
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user