Skip to content

Commit

Permalink
reorganise code
Browse files Browse the repository at this point in the history
Signed-off-by: Zhiyuan Chen <[email protected]>
  • Loading branch information
ZhiyuanChen committed May 18, 2023
1 parent 1afcf45 commit 8e4c061
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chanfig/flat_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,9 @@ def __delattr__(self, name: Any) -> None:
except KeyError:
raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") from None

def __missing__(self, name: Any) -> Any: # pylint: disable=R1710
raise KeyError(name)

def getattr(self, name: str, default: Any = Null) -> Any:
r"""
Get attribute of `FlatDict`.
Expand Down Expand Up @@ -428,9 +431,6 @@ def hasattr(self, name: str) -> bool:
except AttributeError:
return False

def __missing__(self, name: Any) -> Any: # pylint: disable=R1710
raise KeyError(name)

def dict(self, cls: Callable = dict) -> Mapping:
r"""
Convert `FlatDict` to other `Mapping`.
Expand Down

0 comments on commit 8e4c061

Please sign in to comment.