Skip to content

Finish Strict Typing - #885

Merged
blink1073 merged 7 commits into
ipython:mainfrom
blink1073:now-even-more-types
Oct 28, 2023
Merged

blink1073 merged 7 commits into
ipython:mainfrom
blink1073:now-even-more-types

Conversation

@blink1073

Copy link
Copy Markdown
Contributor

No description provided.

Steven Silvester added 2 commits October 28, 2023 11:34
@blink1073
blink1073 force-pushed the now-even-more-types branch from ee4ee88 to 8fbc26e Compare October 28, 2023 16:36
@blink1073
blink1073 enabled auto-merge (squash) October 28, 2023 19:20
@blink1073
blink1073 merged commit 4f0e68b into ipython:main Oct 28, 2023
@blink1073
blink1073 deleted the now-even-more-types branch October 28, 2023 19:23
cursor Bot pushed a commit to apoorvdarshan/traitlets that referenced this pull request Sep 22, 2026
Container.from_string substituted None for a value that failed
literal_eval, then passed it to validate. Since PR ipython#885 added an
allow_none short-circuit to Instance.validate, that None is now
accepted for allow_none containers instead of raising, so a single
--Class.trait=value (e.g. List(allow_none=True)) resolves to None
instead of ['value'].

Validate the original string on parse failure instead of None. A bare
string is not a container, so validation raises as it did before ipython#885,
letting DeferredConfig.get_value fall back to collating the value into
a single-item list.

Fixes ipython#908
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant