@@ -138,7 +138,7 @@ def __init__(
138138 self .module : cst .Module = cst_parse_module_native (source )
139139
140140 @classmethod
141- def from_filename (cls , filename : str | PathLike [str ]) -> Plugin : # pragma: no cover
141+ def from_filename (cls , filename : str | PathLike [str ]) -> Plugin :
142142 # only used with --runslow
143143 with tokenize .open (filename ) as f :
144144 source = f .read ()
@@ -204,7 +204,7 @@ def add_options(option_manager: OptionManager | ArgumentParser):
204204 'lines with "# noqa" at the end.'
205205 ),
206206 )
207- else : # if run as a flake8 plugin
207+ else : # pragma: no-cov-no- flake8
208208 Plugin .standalone = False
209209 # Disable ASYNC9xx calls by default
210210 option_manager .extend_default_ignore (default_disabled_error_codes )
@@ -380,7 +380,7 @@ def get_matching_codes(
380380 }
381381 assert all_codes
382382
383- if options .autofix and not Plugin .standalone :
383+ if options .autofix and not Plugin .standalone : # pragma: no-cov-no-flake8
384384 print ("Cannot autofix when run as a flake8 plugin." , file = sys .stderr )
385385 sys .exit (1 )
386386 autofix_codes = set (get_matching_codes (options .autofix , all_codes ))
@@ -457,6 +457,7 @@ def parse_async200_dict(raw_value: str) -> dict[str, str]:
457457
458458
459459# not run if flake8 is installed
460+ # TODO: this is not tested at all atm, I'm not even sure if it works
460461def parse_per_file_disable ( # pragma: no cover
461462 raw_value : str ,
462463) -> dict [str , tuple [str , ...]]:
0 commit comments