Skip to content

Commit

Permalink
explicit ignore _ipython_canary_ in __missing__
Browse files Browse the repository at this point in the history
Signed-off-by: Zhiyuan Chen <[email protected]>
  • Loading branch information
ZhiyuanChen committed Feb 6, 2023
1 parent f51622c commit e36b9d2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions chanfig/flat_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,8 @@ def hasattr(self, name: str) -> bool:
return False

def __missing__(self, name: str, default: Any = Null) -> Any:
if name == "_ipython_canary_method_should_not_exist_":
return
if default is Null:
# default_factory might not in __dict__ and cannot be replaced with if self.getattr("default_factory")
if "default_factory" not in self.__dict__:
Expand Down

0 comments on commit e36b9d2

Please sign in to comment.