Skip to content

Commit b0dddac

Browse files
committed
Add patch for typing_extensions to recognize _py_abc like stdlib typing module
1 parent 8ff48e4 commit b0dddac

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[[rules]]
2+
patch = 'typing_extensions.patch'
3+
subdir = 'src'
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/typing_extensions.py b/typing_extensions.py
2+
index dec429c..3b711c6 100644
3+
--- a/typing_extensions.py
4+
+++ b/typing_extensions.py
5+
@@ -544,7 +544,7 @@ else:
6+
The abc and functools modules indiscriminately call isinstance() and
7+
issubclass() on the whole MRO of a user class, which may contain protocols.
8+
"""
9+
- return _caller(depth) in {'abc', 'functools', None}
10+
+ return _caller(depth) in {'abc', 'functools', '_py_abc', None}
11+
12+
def _no_init(self, *args, **kwargs):
13+
if type(self)._is_protocol:

0 commit comments

Comments
 (0)