Visitar URL original
GH-109408: Move the Python file whitespace check from patchcheck to pre-commit by AA-Turner · Pull Request #109891 · python/cpython · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Unused function
  • Loading branch information
AA-Turner committed Sep 26, 2023
commit d7160fdee37da22e279efcde636412e0d236331c
16 changes: 0 additions & 16 deletions Tools/patchcheck/patchcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import subprocess
import sysconfig

import reindent
import untabify


Expand Down Expand Up @@ -176,21 +175,6 @@ def report_modified_files(file_paths):
})


@status("Fixing Python file whitespace", info=report_modified_files)
def normalize_whitespace(file_paths):
"""Make sure that the whitespace for .py files have been normalized."""
reindent.makebackup = False # No need to create backups.
fixed = [
path for path in file_paths
if (
path.endswith('.py')
and path not in _PYTHON_FILES_WITH_TABS
and reindent.check(os.path.join(SRCDIR, path))
)
]
return fixed


@status("Fixing C file whitespace", info=report_modified_files)
def normalize_c_whitespace(file_paths):
"""Report if any C files """
Expand Down