Skip to content

Commit f0b0fe7

Browse files
authored
Remove --force-uppercase-builtins flag (#20410)
The flag has been a no-op since mypy 1.17.0.
1 parent e7e5a09 commit f0b0fe7

File tree

3 files changed

+6
-19
lines changed

3 files changed

+6
-19
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ Support for this will be dropped in the first half of 2026!
1111

1212
Contributed by Marc Mueller (PR [20156](https://github.com/python/mypy/pull/20156)).
1313

14+
### Removed Flag: `--force-uppercase-builtins`
15+
16+
Removed the deprecated `--force-uppercase-builtins` flag. It has been a no-op since mypy 1.17.0.
17+
18+
Contributed by Marc Mueller (PR [20410](https://github.com/python/mypy/pull/20410))
19+
1420
### Removed Flag: `--force-union-syntax`
1521

1622
Mypy only supports Python 3.10+. Removed the `--force-union-syntax` flag as it's no longer necessary.

mypy/main.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -815,11 +815,6 @@ def add_invertible_flag(
815815
help="Disable strict Optional checks (inverse: --strict-optional)",
816816
)
817817

818-
# This flag is deprecated, Mypy only supports Python 3.9+
819-
add_invertible_flag(
820-
"--force-uppercase-builtins", default=False, help=argparse.SUPPRESS, group=none_group
821-
)
822-
823818
lint_group = parser.add_argument_group(
824819
title="Configuring warnings",
825820
description="Detect code that is sound but redundant or problematic.",
@@ -1537,9 +1532,6 @@ def set_strict_flags() -> None:
15371532
if options.strict_concatenate and not strict_option_set:
15381533
print("Warning: --strict-concatenate is deprecated; use --extra-checks instead")
15391534

1540-
if options.force_uppercase_builtins:
1541-
print("Warning: --force-uppercase-builtins is deprecated; mypy only supports Python 3.9+")
1542-
15431535
# Set target.
15441536
if special_opts.modules + special_opts.packages:
15451537
options.build_type = BuildType.MODULE

mypy/options.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import re
55
import sys
66
import sysconfig
7-
import warnings
87
from collections.abc import Callable
98
from re import Pattern
109
from typing import Any, Final
@@ -410,8 +409,6 @@ def __init__(self) -> None:
410409

411410
self.disable_bytearray_promotion = False
412411
self.disable_memoryview_promotion = False
413-
# Deprecated, Mypy only supports Python 3.9+
414-
self.force_uppercase_builtins = False
415412

416413
# Sets custom output format
417414
self.output: str | None = None
@@ -422,14 +419,6 @@ def __init__(self) -> None:
422419
# preserving manual tweaks to generated C file)
423420
self.mypyc_skip_c_generation = False
424421

425-
def use_lowercase_names(self) -> bool:
426-
warnings.warn(
427-
"options.use_lowercase_names() is deprecated and will be removed in a future version",
428-
DeprecationWarning,
429-
stacklevel=2,
430-
)
431-
return True
432-
433422
def use_star_unpack(self) -> bool:
434423
return self.python_version >= (3, 11)
435424

0 commit comments

Comments
 (0)