-
-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collating list traits fails when only one is given - regression in traitlets 5.13.0 #908
Comments
The regression is caused by a change in - def validate(self, obj, value):
+ def validate(self, obj: t.Any, value: t.Any) -> T | None:
assert self.klass is not None
+ if self.allow_none and value is None:
+ return value
if isinstance(value, self.klass): # type:ignore[arg-type]
- return value
+ return t.cast(T, value)
else:
self.error(obj, value) Nothing obviously wrong here, but apparently the |
The traitlets/traitlets/config/loader.py Lines 390 to 417 in 13de53c
traitlets/traitlets/traitlets.py Lines 3511 to 3519 in 13de53c
which calls So if we pass |
See jupyterlab/jupyter-ai#913. Introduced in #885 which should have no side effects as it was meant to only update types.
info
argument forTraitType.error()
#884) goodThe text was updated successfully, but these errors were encountered: