Skip to content
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

Field types can change after being set to None #4

Open
malmaud opened this issue Jan 16, 2021 · 0 comments
Open

Field types can change after being set to None #4

malmaud opened this issue Jan 16, 2021 · 0 comments

Comments

@malmaud
Copy link

malmaud commented Jan 16, 2021

I find this behavior surprising with regards to the type safety ConfigDict offers:

c = ConfigDict({'a': 1})
c.a = None
c.a = 'string'

I've managed to change the type of a from integer to string without any invocation of ignore_type. Would it perhaps make sense for the a field to "remember" that it was originally an int?

This is on the master branch (cd29283).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant