We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1161487 commit 7b4f862Copy full SHA for 7b4f862
mypyc/test-data/run-classes.test
@@ -470,11 +470,15 @@ assert foo() == 21
470
[case testClassKwargs]
471
class X:
472
def __init__(self, msg: str, **variables: int) -> None:
473
- pass
+ self.msg = msg
474
+ self.variables = variables
475
+
476
[file driver.py]
477
import traceback
478
from native import X
-X('hello', a=0)
479
+x = X('hello', a=0, b=1)
480
+assert x.msg == 'hello'
481
+assert x.variables == {'a': 0, 'b': 1}
482
try:
483
X('hello', msg='hello')
484
except TypeError as e:
0 commit comments