Skip to content

Commit

Permalink
[PY313] Add stubs for soft-deprecated typing members (#2503)
Browse files Browse the repository at this point in the history
(cherry picked from commit 86c7871)
  • Loading branch information
jacobtylerwalls authored and github-actions[bot] committed Aug 10, 2024
1 parent de58003 commit 405cecc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ What's New in astroid 3.3.2?
============================
Release date: TBA

* Restore support for soft-deprecated members of the ``typing`` module with python 3.13.

Refs pylint-dev/pylint#9852


What's New in astroid 3.3.1?
Expand Down
12 changes: 12 additions & 0 deletions astroid/brain/brain_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,18 @@ class TypeVar:
@classmethod
def __class_getitem__(cls, item): return cls
class TypeVarTuple: ...
class ContextManager:
@classmethod
def __class_getitem__(cls, item): return cls
class AsyncContextManager:
@classmethod
def __class_getitem__(cls, item): return cls
class Pattern:
@classmethod
def __class_getitem__(cls, item): return cls
class Match:
@classmethod
def __class_getitem__(cls, item): return cls
"""
)
)
Expand Down

0 comments on commit 405cecc

Please sign in to comment.