File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ class Format(enum.IntEnum):
2727 STRING = 4
2828
2929
30- _Union = None
3130_sentinel = object ()
3231
3332# Slots shared by ForwardRef and _Stringifier. The __forward__ names must be
@@ -246,16 +245,10 @@ def __hash__(self):
246245 return hash ((self .__forward_arg__ , self .__forward_module__ ))
247246
248247 def __or__ (self , other ):
249- global _Union
250- if _Union is None :
251- from typing import Union as _Union
252- return _Union [self , other ]
248+ return types .UnionType [self , other ]
253249
254250 def __ror__ (self , other ):
255- global _Union
256- if _Union is None :
257- from typing import Union as _Union
258- return _Union [other , self ]
251+ return types .UnionType [other , self ]
259252
260253 def __repr__ (self ):
261254 if self .__forward_module__ is None :
You can’t perform that action at this time.
0 commit comments