File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -144,14 +144,16 @@ def configure(self, config: Any) -> None:
144144 config = config .config # pragma: no cover
145145
146146 # Remove standard "pragma: no cover" regex
147- config .exclude_list .remove (regex_main )
147+ if regex_main in config .exclude_list :
148+ config .exclude_list .remove (regex_main )
149+
150+ if "pragma: no cover" in config .exclude_list :
151+ config .exclude_list .remove ("pragma: no cover" )
148152
149153 excludes = make_regexes (sys .version_info , platform .system (), platform .python_implementation ())
150154 for exc_pattern in excludes :
151155 config .exclude_list .append (exc_pattern .pattern )
152156
153- # print(config.exclude_list)
154-
155157 # Reinstate the general regex, but making sure it isn't followed by a left bracket.
156158 config .exclude_list += [
157159 p .pattern for p in make_not_exclude_regexs (platform .system (), platform .python_implementation ())
You can’t perform that action at this time.
0 commit comments