Skip to content

Commit b60bc1c

Browse files
committed
Handle changes in latest coverage.py
1 parent bc9b80e commit b60bc1c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

coverage_pyver_pragma/__init__.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ def evaluate_exclude(expression: str) -> bool:
7474

7575
class PythonParser(coverage.python.PythonParser):
7676

77-
@functools.lru_cache()
7877
def lines_matching(self, *regexes) -> Set[int]: # pragma: no cover (py311+) # TODO: why?
7978

8079
combined = join_regex([*regexes, *DEFAULT_EXCLUDE])
@@ -83,7 +82,7 @@ def lines_matching(self, *regexes) -> Set[int]: # pragma: no cover (py311+) #
8382
matches = set()
8483
exclude = DSL_EXCLUDE
8584

86-
for idx, ltext in enumerate(self.lines, start=1):
85+
for idx, ltext in enumerate(self.text.split('\n'), start=1):
8786

8887
dsl_m = exclude.match(ltext)
8988

0 commit comments

Comments
 (0)