Skip to content

Commit

Permalink
Mypybot/sync typeshed (python#17280)
Browse files Browse the repository at this point in the history
Sync typeshed before 1.11 release.

---------

Co-authored-by: Shantanu <[email protected]>
Co-authored-by: AlexWaygood <[email protected]>
Co-authored-by: Jelle Zijlstra <[email protected]>
  • Loading branch information
4 people authored May 24, 2024
1 parent 25087fd commit 43a605f
Show file tree
Hide file tree
Showing 103 changed files with 1,943 additions and 529 deletions.
4 changes: 3 additions & 1 deletion mypy/fastparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -2041,8 +2041,10 @@ def visit_Subscript(self, n: ast3.Subscript) -> Type:
sliceval.col_offset = sliceval.lower.col_offset
else:
assert isinstance(n.slice, ast3.ExtSlice)
dims = copy.deepcopy(n.slice.dims)
dims = cast(List[ast3.expr], copy.deepcopy(n.slice.dims))
for s in dims:
# These fields don't actually have a col_offset attribute but we add
# it manually.
if getattr(s, "col_offset", None) is None:
if isinstance(s, ast3.Index):
s.col_offset = s.value.col_offset
Expand Down
2 changes: 1 addition & 1 deletion mypy/pyinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def getsearchdirs() -> tuple[list[str], list[str]]:


if __name__ == "__main__":
sys.stdout.reconfigure(encoding="utf-8") # type: ignore [attr-defined]
sys.stdout.reconfigure(encoding="utf-8") # type: ignore[union-attr]
if sys.argv[-1] == "getsearchdirs":
print(repr(getsearchdirs()))
else:
Expand Down
2 changes: 1 addition & 1 deletion mypy/typeshed/stdlib/VERSIONS
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ ipaddress: 3.3-
itertools: 3.0-
json: 3.0-
keyword: 3.0-
lib2to3: 3.0-
lib2to3: 3.0-3.12
linecache: 3.0-
locale: 3.0-
logging: 3.0-
Expand Down
Loading

0 comments on commit 43a605f

Please sign in to comment.