Skip to content

Commit d8c67c3

Browse files
authored
[release 1.11] Ignore some errors in typeshed (#17510)
If type-checking typeshed without errors disabled, there were some errors in the `release-1.11` branch. These errors can break some use cases. Ignore them for now with a quick patch. We'd probably want to ignore them in typeshed as well before the next release after 1.11.
1 parent 294daff commit d8c67c3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

mypy/typeshed/stdlib/tkinter/__init__.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -3503,7 +3503,7 @@ class Spinbox(Widget, XView):
35033503
def scan_dragto(self, x): ...
35043504
def selection(self, *args) -> tuple[int, ...]: ...
35053505
def selection_adjust(self, index): ...
3506-
def selection_clear(self): ...
3506+
def selection_clear(self): ... # type: ignore[override]
35073507
def selection_element(self, element: Incomplete | None = None): ...
35083508
def selection_from(self, index: int) -> None: ...
35093509
def selection_present(self) -> None: ...

mypy/typeshed/stdlib/tkinter/ttk.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,7 @@ class Treeview(Widget, tkinter.XView, tkinter.YView):
10521052
anchor: tkinter._Anchor = ...,
10531053
command: str | Callable[[], object] = ...,
10541054
) -> None: ...
1055-
def identify(self, component, x, y): ... # Internal Method. Leave untyped
1055+
def identify(self, component, x, y): ... # type: ignore[override] # Internal Method. Leave untyped
10561056
def identify_row(self, y: int) -> str: ...
10571057
def identify_column(self, x: int) -> str: ...
10581058
def identify_region(self, x: int, y: int) -> Literal["heading", "separator", "tree", "cell", "nothing"]: ...

mypy/typeshed/stdlib/urllib/parse.pyi

+2-2
Original file line numberDiff line numberDiff line change
@@ -198,13 +198,13 @@ else:
198198

199199
# Requires an iterable of length 6
200200
@overload
201-
def urlunparse(components: Iterable[None]) -> Literal[b""]: ...
201+
def urlunparse(components: Iterable[None]) -> Literal[b""]: ... # type: ignore[overload-overlap]
202202
@overload
203203
def urlunparse(components: Iterable[AnyStr | None]) -> AnyStr: ...
204204

205205
# Requires an iterable of length 5
206206
@overload
207-
def urlunsplit(components: Iterable[None]) -> Literal[b""]: ...
207+
def urlunsplit(components: Iterable[None]) -> Literal[b""]: ... # type: ignore[overload-overlap]
208208
@overload
209209
def urlunsplit(components: Iterable[AnyStr | None]) -> AnyStr: ...
210210
def unwrap(url: str) -> str: ...

0 commit comments

Comments
 (0)