Skip to content

Commit 73cbda3

Browse files
committed
Match new parser behavior w.r.t. posonly args
1 parent d32c4d3 commit 73cbda3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mypy/nativeparse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ def read_func_def(state: State, data: ReadBuffer) -> FuncDef:
672672
name = read_str(data)
673673
arguments, has_ann = read_parameters(state, data)
674674

675-
if special_function_elide_names(name):
675+
if state.options.pos_only_special_methods and special_function_elide_names(name):
676676
for arg in arguments:
677677
arg.pos_only = True
678678

0 commit comments

Comments
 (0)