We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bc25303 commit 977544aCopy full SHA for 977544a
upath/core.py
@@ -121,8 +121,18 @@ class _IncompatibleProtocolError(TypeError, ValueError):
121
"""switch to TypeError for incompatible protocols in a backward compatible way.
122
123
!!! Do not use this exception directly !!!
124
+ Catch TypeError instead, if you need to handle incompatible protocol errors.
125
+
126
+ We'll do the switch in a future major release.
127
"""
128
129
+ # evil: make this look like a built-in TypeError
130
+ __module__ = "builtins"
131
+ __qualname__ = "TypeError"
132
133
+ def __repr__(self) -> str:
134
+ return f"TypeError({', '.join(map(repr, self.args))})"
135
136
137
class _UPathMeta(ABCMeta):
138
"""metaclass for UPath to customize instance creation
0 commit comments