File tree 4 files changed +3
-16
lines changed
4 files changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -472,12 +472,7 @@ def parse_section(
472
472
)
473
473
continue
474
474
else :
475
- dv = None
476
- # We have to keep new_semantic_analyzer in Options
477
- # for plugin compatibility but it is not a valid option anymore.
478
- assert hasattr (template , "new_semantic_analyzer" )
479
- if key != "new_semantic_analyzer" :
480
- dv = getattr (template , key , None )
475
+ dv = getattr (template , key , None )
481
476
if dv is None :
482
477
if key .endswith ("_report" ):
483
478
report_type = key [:- 7 ].replace ("_" , "-" )
Original file line number Diff line number Diff line change @@ -400,17 +400,12 @@ def use_or_syntax(self) -> bool:
400
400
def use_star_unpack (self ) -> bool :
401
401
return self .python_version >= (3 , 11 )
402
402
403
- # To avoid breaking plugin compatibility, keep providing new_semantic_analyzer
404
- @property
405
- def new_semantic_analyzer (self ) -> bool :
406
- return True
407
-
408
403
def snapshot (self ) -> dict [str , object ]:
409
404
"""Produce a comparable snapshot of this Option"""
410
405
# Under mypyc, we don't have a __dict__, so we need to do worse things.
411
406
d = dict (getattr (self , "__dict__" , ()))
412
407
for k in get_class_descriptors (Options ):
413
- if hasattr (self , k ) and k != "new_semantic_analyzer" :
408
+ if hasattr (self , k ):
414
409
d [k ] = getattr (self , k )
415
410
# Remove private attributes from snapshot
416
411
d = {k : v for k , v in d .items () if not k .startswith ("_" )}
Original file line number Diff line number Diff line change @@ -114,9 +114,6 @@ class C: pass
114
114
Note that a forward reference in a function signature won't trigger another
115
115
pass, since all functions are processed only after the top level has been fully
116
116
analyzed.
117
-
118
- You can use `api.options.new_semantic_analyzer` to check whether the new
119
- semantic analyzer is enabled (it's always true in mypy 0.730 and later).
120
117
"""
121
118
122
119
from __future__ import annotations
Original file line number Diff line number Diff line change @@ -594,7 +594,7 @@ def get_assignment_target(
594
594
if isinstance (symbol , Decorator ):
595
595
symbol = symbol .func
596
596
if symbol is None :
597
- # New semantic analyzer doesn't create ad-hoc Vars for special forms.
597
+ # Semantic analyzer doesn't create ad-hoc Vars for special forms.
598
598
assert lvalue .is_special_form
599
599
symbol = Var (lvalue .name )
600
600
if not for_read and isinstance (symbol , Var ) and symbol .is_cls :
You can’t perform that action at this time.
0 commit comments