From 6aa9d1d91b6c29b9ac3f025ab8ff69d1d18c2e26 Mon Sep 17 00:00:00 2001 From: AlexCLeduc Date: Fri, 16 Oct 2020 21:44:32 -0400 Subject: exclude omitted files from already-imported warnings when plugins import those modules --- coverage/inorout.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/coverage/inorout.py b/coverage/inorout.py index fbd1a95e..4fb1f735 100644 --- a/coverage/inorout.py +++ b/coverage/inorout.py @@ -384,6 +384,11 @@ class InOrOut(object): if filename in warned: continue + file_path = canonical_filename(filename) + if self.omit_match and self.omit_match.match(file_path): + continue + + disp = self.should_trace(filename) if disp.trace: msg = "Already imported a file that will be measured: {}".format(filename) -- cgit v1.2.1