MCPcopy Index your code
hub / github.com/numpy/numpy / process_files

Function process_files

tools/check_python_h_first.py:172–186  ·  view source on GitHub ↗
(file_list: list[str])

Source from the content-addressed store, hash-verified

170
171
172def 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
189def find_c_cpp_files(root: str) -> list[str]:

Callers 1

Calls 4

get_submodule_pathsFunction · 0.90
anyFunction · 0.85
joinMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…