@@ -124,24 +124,27 @@ ignore_errors = true
124124skip_empty = true
125125
126126exclude_also = [
127- # Have to re-enable the standard pragma
127+ " @(abc\\ .)?abstractmethod" ,
128+ " @deprecated\\ ([^\\ )]+\\ )" ,
129+ " @unittest\\ .skip" ,
130+ " class .+\\ bProtocol\\ ):" ,
128131 " except ImportError" ,
129132 " except KeyboardInterrupt" ,
130133 " except OSError" ,
131- " except \\ w*ServerError" ,
132134 " except SyntaxError" ,
133- " raise ImportError" ,
134- " raise NotImplementedError" ,
135- " raise unittest\\ .SkipTest" ,
136- " self\\ .skipTest" ,
137- " if __name__ == .__main__.:" ,
135+ " except \\ w*ServerError" ,
136+ " if (0|False):" ,
138137 " if .+PYWIKIBOT_TEST_\\ w+.+:" ,
138+ " if TYPE_CHECKING:" ,
139+ " if __debug__:" ,
140+ " if __name__ == .__main__.:" ,
139141 " if self\\ .mw_version < .+:" ,
140- " @(abc\\ .)?abstractmethod" ,
141- " @deprecated\\ ([^\\ )]+\\ )" ,
142- " @unittest\\ .skip" ,
143142 # Comments to turn coverage on and off:
144143 " no cover: start(?s:.)*?no cover: stop" ,
144+ " raise ImportError" ,
145+ " raise NotImplementedError" ,
146+ " raise unittest\\ .SkipTest" ,
147+ " self\\ .skipTest" ,
145148]
146149
147150
0 commit comments