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

Make missing {Dict,List}Config compare equal to "???" #742

Merged
merged 2 commits into from
Jun 3, 2021

Conversation

Jasha10
Copy link
Collaborator

@Jasha10 Jasha10 commented Jun 3, 2021

Closes #741.

I've added an additional branch to each of DictConfig.__eq__ and ListConfig.__eq__:

if self._is_missing:
    return _is_missing_literal(other)

This allows for assert DictConfig("???") == "???" and assert ListConfig("???") == "???".

Copy link
Owner

@omry omry left a comment

Choose a reason for hiding this comment

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

lgtm.
@odelalleau , wdyt?

Co-authored-by: Omry Yadan <[email protected]>
@Jasha10 Jasha10 merged commit 3cc1911 into omry:master Jun 3, 2021
@Jasha10 Jasha10 deleted the closes741 branch June 4, 2021 19:34
Jasha10 added a commit to Jasha10/omegaconf that referenced this pull request Jun 4, 2021
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

Successfully merging this pull request may close these issues.

DictConfig("???") == "???" evaluates to False
3 participants