Skip to content

Commit 2dc89dc

Browse files
authored
Fix slicing with nonstrict optional (python#21282)
Fixes python#21261 I didn't add a regression test because you need custom fixtures and I just don't think any nonstrict optional change is worth the trouble
1 parent 93bc02b commit 2dc89dc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mypy/typeanal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2108,7 +2108,7 @@ def fix_instance(
21082108
t.args = tuple(args)
21092109
fix_type_var_tuple_argument(t)
21102110
if not t.type.has_type_var_tuple_type:
2111-
with state.strict_optional_set(options.strict_optional):
2111+
with state.strict_optional_set(True):
21122112
fixed = expand_type(t, env)
21132113
assert isinstance(fixed, Instance)
21142114
t.args = fixed.args

0 commit comments

Comments
 (0)