Skip to content

Commit 7c7a771

Browse files
committed
More changes
1 parent df2d8e3 commit 7c7a771

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

mypy/config_parser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ def parse_config_file(
284284

285285
os.environ["MYPY_CONFIG_FILE_DIR"] = os.path.dirname(os.path.abspath(config_file))
286286

287-
def set_strict_flags(updates: Dict[str, object]) -> None:
287+
def set_strict_flags(updates: dict[str, object]) -> None:
288288
updates.update(strict_flag_assignments)
289289

290290
if "mypy" not in parser:
@@ -300,7 +300,7 @@ def set_strict_flags(updates: Dict[str, object]) -> None:
300300
setattr(options, k, v)
301301
options.report_dirs.update(report_dirs)
302302

303-
def set_strict_flags_section(updates: Dict[str, object]) -> None:
303+
def set_strict_flags_section(updates: dict[str, object]) -> None:
304304
for dest, value in strict_flag_assignments:
305305
if dest in PER_MODULE_OPTIONS:
306306
updates[dest] = value
@@ -448,7 +448,7 @@ def destructure_overrides(toml_data: dict[str, Any]) -> dict[str, Any]:
448448
def parse_section(
449449
prefix: str,
450450
template: Options,
451-
set_strict_flags: Callable[[Dict[str, object]], None],
451+
set_strict_flags: Callable[[dict[str, object]], None],
452452
section: Mapping[str, Any],
453453
config_types: dict[str, Any],
454454
stderr: TextIO = sys.stderr,

mypy/main.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,7 +1265,6 @@ def add_invertible_flag(
12651265
parser.error(f"Cannot find config file '{config_file}'")
12661266

12671267
options = Options()
1268-
strict_option_set = False
12691268

12701269
# Parse config file first, so command line can override.
12711270
parse_config_file(options, strict_flag_assignments, config_file, stdout, stderr)
@@ -1395,9 +1394,6 @@ def add_invertible_flag(
13951394
" new type inference algorithm is already enabled by default"
13961395
)
13971396

1398-
if options.strict_concatenate and not strict_option_set:
1399-
print("Warning: --strict-concatenate is deprecated; use --extra-checks instead")
1400-
14011397
# Set target.
14021398
if special_opts.modules + special_opts.packages:
14031399
options.build_type = BuildType.MODULE

mypy/options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def __init__(self) -> None:
212212
# This makes 1 == '1', 1 in ['1'], and 1 is '1' errors.
213213
self.strict_equality = False
214214

215-
# Deprecated, use extra_checks instead.
215+
# Make arguments prepended via Concatenate be truly positional-only.
216216
self.strict_concatenate = False
217217

218218
# Enable additional checks that are technically correct but impractical.

mypy/test/teststubtest.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2650,7 +2650,11 @@ def test_config_file_strict(self) -> None:
26502650
assert output == (
26512651
"note: warn_unused_configs = True [global]\n"
26522652
"note: warn_unused_ignores = True [global]\n"
2653+
"Success: no issues found in 1 module\n"
26532654
)
26542655
config_file = "[mypy-test_module.*]\nstrict = True\n"
26552656
output = run_stubtest(stub="", runtime="", options=[], config_file=config_file)
2656-
assert output == ("note: warn_unused_ignores = True [test_module.*]\n")
2657+
assert output == (
2658+
"note: warn_unused_ignores = True [test_module.*]\n"
2659+
"Success: no issues found in 1 module\n"
2660+
)

0 commit comments

Comments
 (0)