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

Ensure that bare attributes with default None are removed too #556

merged 3 commits into from Jul 23, 2019


Copy link

@hynek hynek commented Jul 21, 2019

Fixes #523

Classic None-as-sentinel-where-None-is-a-valid-value-blunder.

@ambv ambv merged commit dc1b5a0 into master Jul 23, 2019
14 checks passed
@hynek hynek deleted the none-attribs branch Jul 23, 2019
@@ -504,7 +507,7 @@ def _patch_original_class(self):
for name in self._attr_names:
if (
name not in base_names
and getattr(cls, name, None) is not None
and getattr(cls, name, _sentinel) != _sentinel

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should use is not

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

Successfully merging this pull request may close these issues.

3 participants