Skip to content

Commit

Permalink
[release 1.11] Ignore some errors in typeshed (#17510)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
JukkaL authored Jul 8, 2024
1 parent 294daff commit d8c67c3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mypy/typeshed/stdlib/tkinter/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3503,7 +3503,7 @@ class Spinbox(Widget, XView):
def scan_dragto(self, x): ...
def selection(self, *args) -> tuple[int, ...]: ...
def selection_adjust(self, index): ...
def selection_clear(self): ...
def selection_clear(self): ... # type: ignore[override]
def selection_element(self, element: Incomplete | None = None): ...
def selection_from(self, index: int) -> None: ...
def selection_present(self) -> None: ...
Expand Down
2 changes: 1 addition & 1 deletion mypy/typeshed/stdlib/tkinter/ttk.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ class Treeview(Widget, tkinter.XView, tkinter.YView):
anchor: tkinter._Anchor = ...,
command: str | Callable[[], object] = ...,
) -> None: ...
def identify(self, component, x, y): ... # Internal Method. Leave untyped
def identify(self, component, x, y): ... # type: ignore[override] # Internal Method. Leave untyped
def identify_row(self, y: int) -> str: ...
def identify_column(self, x: int) -> str: ...
def identify_region(self, x: int, y: int) -> Literal["heading", "separator", "tree", "cell", "nothing"]: ...
Expand Down
4 changes: 2 additions & 2 deletions mypy/typeshed/stdlib/urllib/parse.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,13 @@ else:

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

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

0 comments on commit d8c67c3

Please sign in to comment.