File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -85,11 +85,14 @@ def _get_str(self, value: Any) -> str:
8585 def _get_str_value (self , field : str ) -> str :
8686 return self ._get_str (getattr (self , field ))
8787
88- def __repr__ (self ) -> str :
88+ def _cfg_str (self ) -> str :
8989 return f"{ self .__repr_name__ ()} (\n { self .__repr_str__ (chr (10 ) + ' ' )} )"
9090
91+ def __repr__ (self ) -> str :
92+ return self ._cfg_str ()
93+
9194 def __str__ (self ) -> str :
92- return f" { self .__repr_name__ () } ( \n { self . __repr_str__ ( chr ( 10 ) + ' ' ) } )"
95+ return self ._cfg_str ()
9396
9497 def __repr_args__ (self ) -> List [Tuple [str , str ]]:
9598 return [
@@ -125,7 +128,7 @@ def changed_fields(self) -> Dict[str, Any]:
125128
126129 def print_cfg (self ) -> None :
127130 """Print full config"""
128- print (repr ( self ))
131+ print (self . _cfg_str ( ))
129132
130133 def print_set_fields (self ) -> None :
131134 """Print fields changed at init."""
You can’t perform that action at this time.
0 commit comments