@@ -138,7 +138,7 @@ def __init__(
138
138
self .module : cst .Module = cst_parse_module_native (source )
139
139
140
140
@classmethod
141
- def from_filename (cls , filename : str | PathLike [str ]) -> Plugin : # pragma: no cover
141
+ def from_filename (cls , filename : str | PathLike [str ]) -> Plugin :
142
142
# only used with --runslow
143
143
with tokenize .open (filename ) as f :
144
144
source = f .read ()
@@ -204,7 +204,7 @@ def add_options(option_manager: OptionManager | ArgumentParser):
204
204
'lines with "# noqa" at the end.'
205
205
),
206
206
)
207
- else : # if run as a flake8 plugin
207
+ else : # pragma: no-cov-no- flake8
208
208
Plugin .standalone = False
209
209
# Disable ASYNC9xx calls by default
210
210
option_manager .extend_default_ignore (default_disabled_error_codes )
@@ -380,7 +380,7 @@ def get_matching_codes(
380
380
}
381
381
assert all_codes
382
382
383
- if options .autofix and not Plugin .standalone :
383
+ if options .autofix and not Plugin .standalone : # pragma: no-cov-no-flake8
384
384
print ("Cannot autofix when run as a flake8 plugin." , file = sys .stderr )
385
385
sys .exit (1 )
386
386
autofix_codes = set (get_matching_codes (options .autofix , all_codes ))
@@ -457,6 +457,7 @@ def parse_async200_dict(raw_value: str) -> dict[str, str]:
457
457
458
458
459
459
# not run if flake8 is installed
460
+ # TODO: this is not tested at all atm, I'm not even sure if it works
460
461
def parse_per_file_disable ( # pragma: no cover
461
462
raw_value : str ,
462
463
) -> dict [str , tuple [str , ...]]:
0 commit comments