File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -389,7 +389,7 @@ def parse_options(self, params) -> List[Option]:
389
389
def _is_typing_union (self , annotation ):
390
390
return (
391
391
getattr (annotation , '__origin__' , None ) is Union
392
- or annotation is getattr (types , "UnionType" , Union )
392
+ or type ( annotation ) is getattr (types , "UnionType" , Union )
393
393
) # type: ignore
394
394
395
395
def _is_typing_optional (self , annotation ):
Original file line number Diff line number Diff line change @@ -1022,7 +1022,7 @@ def short_doc(self) -> str:
1022
1022
def _is_typing_optional (self , annotation : Union [T , Optional [T ]]) -> TypeGuard [Optional [T ]]:
1023
1023
return (
1024
1024
(getattr (annotation , '__origin__' , None ) is Union
1025
- or annotation is getattr (types , "UnionType" , Union ))
1025
+ or type ( annotation ) is getattr (types , "UnionType" , Union ))
1026
1026
and type (None ) in annotation .__args__ # type: ignore
1027
1027
)
1028
1028
@property
You can’t perform that action at this time.
0 commit comments