_PropertySetter
silently ignores multiple positional arguments
#3661
Labels
_PropertySetter
silently ignores multiple positional arguments
#3661
Adapted from #3659 (comment)
What happened?
Minimal Repro
These are all valid:
Both of these cases naively just ignore everything after the first argument:
Expected
Behavior similar the wrapped class:
Cause
_PropertySetter.__call__
doesn't align withSchemaBase.__init__
:altair/tools/schemapi/schemapi.py
Lines 1602 to 1606 in 6beec7b
Above, we silently drop any positional args after the first (see recording)
Below, we
raise
anAssertionError
if there is more than 1 positional argumentaltair/tools/schemapi/schemapi.py
Lines 1018 to 1038 in 6beec7b
Note
Appears to have been present in all
5.*
versionsWhat would you like to happen instead?
I think we should
raise
for all cases that look like this:Which version of Altair are you using?
5.5.0dev
The text was updated successfully, but these errors were encountered: