Merge pull request #7837 from asottile/py36_union_pattern_match

py36+: remove workaround for Union[Pattern/Match] bug
This commit is contained in:
Anthony Sottile
2020-10-02 19:47:50 -07:00
committed by GitHub
3 changed files with 7 additions and 7 deletions

View File

@@ -625,7 +625,7 @@ class ExceptionInfo(Generic[_E]):
)
return fmt.repr_excinfo(self)
def match(self, regexp: "Union[str, Pattern[str]]") -> "Literal[True]":
def match(self, regexp: Union[str, Pattern[str]]) -> "Literal[True]":
"""Check whether the regular expression `regexp` matches the string
representation of the exception using :func:`python:re.search`.