Use MaybeNone (alias to Any) when applicable (#12855)

This commit is contained in:
Oleh Prypin
2024-10-18 23:07:52 +02:00
committed by GitHub
parent 7fb84668fc
commit b2f68ec2fe
10 changed files with 43 additions and 41 deletions

View File

@@ -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