nodes: fix tracebacks from collection errors are not getting pruned (#11711)

Fix #11710.
This commit is contained in:
Ran Benita
2023-12-31 10:14:23 +02:00
committed by GitHub
parent 640f84a5aa
commit d220880924
3 changed files with 25 additions and 1 deletions

View File

@@ -579,7 +579,7 @@ class Collector(Node, abc.ABC):
ntraceback = traceback.cut(path=self.path)
if ntraceback == traceback:
ntraceback = ntraceback.cut(excludepath=tracebackcutdir)
return excinfo.traceback.filter(excinfo)
return ntraceback.filter(excinfo)
return excinfo.traceback