mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
small corrections in too few argument errors
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
# normal arguments (no keywords)
|
||||
# -----------------
|
||||
|
||||
|
||||
def simple(a):
|
||||
return a
|
||||
|
||||
@@ -36,7 +37,13 @@ simple(1, a=1)
|
||||
def two_params(x, y):
|
||||
return y
|
||||
|
||||
|
||||
two_params(y=2, x=1)
|
||||
two_params(1, y=2)
|
||||
#! 10 type-error
|
||||
|
||||
# The next two statements should generate errors. Basically it should generate
|
||||
# something like `TypeError: x() got multiple values for keyword argument 'a'`.
|
||||
# For now however, any error should be fine.
|
||||
two_params(1, x=2)
|
||||
#! 17 type-error-too-many-arguments
|
||||
two_params(1, 2, y=3)
|
||||
|
||||
Reference in New Issue
Block a user