Skip to content

OmegaConf.create(None) is None != True #1196

@asafarevich

Description

@asafarevich

Describe the bug
DictConfig with None as value does not get treated as None
side note: OmegaConf.create(None) == None returns True, but itsn't a valid way to solve the problem cause that triggers flake8 and such...

To Reproduce

print(OmegaConf.create(None) is None) # returns False

Expected behavior

print(OmegaConf.create(None) is None) # returns True

Additional context

  • OmegaConf version: 2.3.0
  • Python version: 3.9.0
  • Operating system:Ubuntu 22.04.4 LTS
  • Please provide a minimal repro
from omegaconf import OmegaConf
print(OmegaConf.create(None) is None) # False

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions