Skip to content

Commit bd4977e

Browse files
authored
Merge pull request #7442 from gnikonorov/issue_7439
fix mypy issue by using typing Match instead of re.Match
2 parents 74f20f9 + e596b26 commit bd4977e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/_pytest/junitxml.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from datetime import datetime
1717
from typing import Dict
1818
from typing import List
19+
from typing import Match
1920
from typing import Optional
2021
from typing import Tuple
2122
from typing import Union
@@ -70,7 +71,7 @@ class Junit(py.xml.Namespace):
7071

7172

7273
def bin_xml_escape(arg: str) -> py.xml.raw:
73-
def repl(matchobj: "re.Match[str]") -> str:
74+
def repl(matchobj: Match[str]) -> str:
7475
i = ord(matchobj.group())
7576
if i <= 0xFF:
7677
return "#x%02X" % i

0 commit comments

Comments
 (0)