MCPcopy
hub / github.com/PyCQA/flake8 / check_files

Method check_files

src/flake8/api/legacy.py:103–118  ·  view source on GitHub ↗

Run collected checks on the files provided. This will check the files passed in and return a :class:`Report` instance. :param paths: List of filenames (or paths) to check. :returns: Object that mimic's Flake8 2.0's Reporter class.

(self, paths: list[str] | None = None)

Source from the content-addressed store, hash-verified

101 return self._application.options.filenames
102
103 def check_files(self, paths: list[str] | None = None) -> Report:
104 """Run collected checks on the files provided.
105
106 This will check the files passed in and return a :class:`Report`
107 instance.
108
109 :param paths:
110 List of filenames (or paths) to check.
111 :returns:
112 Object that mimic's Flake8 2.0's Reporter class.
113 """
114 assert self._application.options is not None
115 self._application.options.filenames = paths
116 self._application.run_checks()
117 self._application.report_errors()
118 return Report(self._application)
119
120 def excluded(self, filename: str, parent: str | None = None) -> bool:
121 """Determine if a file is excluded.

Callers 3

input_fileMethod · 0.95
test_legacy_apiFunction · 0.80

Calls 3

ReportClass · 0.85
report_errorsMethod · 0.80
run_checksMethod · 0.45

Tested by 2

test_legacy_apiFunction · 0.64