(file_list: list[str])
| 170 | |
| 171 | |
| 172 | def process_files(file_list: list[str]) -> int: |
| 173 | n_out_of_order = 0 |
| 174 | submodule_paths = get_submodule_paths() |
| 175 | root_directory = os.path.dirname(os.path.dirname(__file__)) |
| 176 | for name_to_check in sorted(file_list, key=sort_order): |
| 177 | name_to_check = os.path.join(root_directory, name_to_check) |
| 178 | if any(submodule_path in name_to_check for submodule_path in submodule_paths): |
| 179 | continue |
| 180 | if ".dispatch." in name_to_check: |
| 181 | continue |
| 182 | try: |
| 183 | n_out_of_order += check_python_h_included_first(name_to_check) |
| 184 | except UnicodeDecodeError: |
| 185 | print(f"File {name_to_check:s} not utf-8", sys.stdout) |
| 186 | return n_out_of_order |
| 187 | |
| 188 | |
| 189 | def find_c_cpp_files(root: str) -> list[str]: |
no test coverage detected
searching dependent graphs…