diff --git a/boa/coverage.py b/boa/coverage.py index 4257482a..d7695e16 100644 --- a/boa/coverage.py +++ b/boa/coverage.py @@ -60,7 +60,10 @@ def _valid_frame(self, frame): def dynamic_source_filename(self, filename, frame): if not self._valid_frame(frame): return None - return frame.f_locals["filename"] + ret = frame.f_locals["filename"] + if ret is not None and not ret.endswith(".vy"): + return None + return ret def has_dynamic_source_filename(self): return True