MCPcopy Index your code
hub / github.com/python/cpython / main

Function main

Tools/patchcheck/patchcheck.py:204–226  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

202
203
204def main():
205 base_branch = get_base_branch()
206 file_paths = changed_files(base_branch)
207 has_doc_files = any(fn for fn in file_paths if fn.startswith('Doc') and
208 fn.endswith(('.rst', '.inc')))
209 misc_files = {p for p in file_paths if p.startswith('Misc')}
210 # Docs updated.
211 docs_modified(has_doc_files)
212 # Misc/NEWS changed.
213 reported_news(misc_files)
214 # Regenerated configure, if necessary.
215 regenerated_configure(file_paths)
216 # Regenerated pyconfig.h.in, if necessary.
217 regenerated_pyconfig_h_in(file_paths)
218
219 # Test suite run and passed.
220 has_c_files = any(fn for fn in file_paths if fn.endswith(('.c', '.h')))
221 has_python_files = any(fn for fn in file_paths if fn.endswith('.py'))
222 print()
223 if has_c_files:
224 print("Did you run the test suite and check for refleaks?")
225 elif has_python_files:
226 print("Did you run the test suite?")
227
228
229if __name__ == '__main__':

Callers 1

patchcheck.pyFile · 0.70

Calls 9

get_base_branchFunction · 0.85
changed_filesFunction · 0.85
docs_modifiedFunction · 0.85
reported_newsFunction · 0.85
regenerated_configureFunction · 0.85
anyFunction · 0.50
startswithMethod · 0.45
endswithMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…