Remove Python 3.10 support now that it is EOL (#60402)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
0004536dd0
commit
21d9758459
@@ -88,7 +88,11 @@ CHECK_IMPORTS = {
|
||||
allowed_pattern=re.compile(r"^\s*import\s+pybase64(\s*|\s+as\s+base64\s*)$"),
|
||||
),
|
||||
"re": ForbiddenImport(
|
||||
pattern=r"^\s*(?:import\s+re(?:$|\s|,)|from\s+re\s+import)",
|
||||
# regex has no equivalent of the private sre modules
|
||||
pattern=(
|
||||
r"^\s*(?:import\s+re(?:$|\s|,)"
|
||||
r"|from\s+re\s+import(?!(?:\s*,?\s*_(?:constants|parser))+\s*(?:#.*)?$))"
|
||||
),
|
||||
tip="Replace 'import re' with 'import regex as re' or 'import regex'.",
|
||||
allowed_pattern=re.compile(r"^\s*import\s+regex(\s*|\s+as\s+re\s*)$"),
|
||||
allowed_files={"setup.py"},
|
||||
|
||||
@@ -10,7 +10,7 @@ Usage:
|
||||
python tools/pre_commit/mypy.py <python_version> <changed_files...>
|
||||
|
||||
Args:
|
||||
python_version: Python version to use (e.g., "3.10") or "local" to use
|
||||
python_version: Python version to use (e.g., "3.11") or "local" to use
|
||||
the local Python version.
|
||||
changed_files: List of changed files to check.
|
||||
|
||||
@@ -152,7 +152,7 @@ def mypy(
|
||||
|
||||
Args:
|
||||
targets: List of files or directories to check.
|
||||
python_version: Python version to use (e.g., "3.10") or None to use
|
||||
python_version: Python version to use (e.g., "3.11") or None to use
|
||||
the default mypy version.
|
||||
follow_imports: Value for the --follow-imports option or None to use
|
||||
the default mypy behavior.
|
||||
|
||||
Reference in New Issue
Block a user