Skip to content
Prev Previous commit
Next Next commit
Add whitespace
  • Loading branch information
hugovk committed Sep 25, 2023
commit 029a9a4c16cda106cacd0fc70177880f84469c5f
5 changes: 5 additions & 0 deletions Tools/patchcheck/patchcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ def normalize_c_whitespace(file_paths):

ws_re = re.compile(br'\s+(\r?\n)$')


@status("Fixing docs whitespace", info=report_modified_files)
def normalize_docs_whitespace(file_paths):
fixed = []
Expand Down Expand Up @@ -244,6 +245,7 @@ def reported_news(file_paths):
return any(p.startswith(os.path.join('Misc', 'NEWS.d', 'next'))
for p in file_paths)


@status("configure regenerated", modal=True, info=str)
def regenerated_configure(file_paths):
"""Check if configure has been regenerated."""
Expand All @@ -252,6 +254,7 @@ def regenerated_configure(file_paths):
else:
return "not needed"


@status("pyconfig.h.in regenerated", modal=True, info=str)
def regenerated_pyconfig_h_in(file_paths):
"""Check if pyconfig.h.in has been regenerated."""
Expand All @@ -260,6 +263,7 @@ def regenerated_pyconfig_h_in(file_paths):
else:
return "not needed"


def ci(pull_request):
if pull_request == 'false':
print('Not a pull request; skipping')
Expand All @@ -281,6 +285,7 @@ def ci(pull_request):
print('(on UNIX you can run `make patchcheck` to make the fixes)')
sys.exit(1)


def main():
base_branch = get_base_branch()
file_paths = changed_files(base_branch)
Expand Down