File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1071,14 +1071,15 @@ def __repr__(self):
10711071 "interpolation" : type (self ._interpolation ).__name__ ,
10721072 }
10731073 init_params = {k : v for k , v in init_params .items () if v is not None }
1074+ sections_count = len (self ._sections )
10741075 state_summary = {
10751076 "loaded_sources" : self ._loaded_sources ,
1076- "sections_count" : len ( self . _sections ) ,
1077- "sections" : list (self ._sections . keys ()) [:5 ], # Limit to 5 section names for readability
1077+ "sections_count" : sections_count ,
1078+ "sections" : list (self ._sections ) [:5 ], # limit to 5 section names for readability
10781079 }
10791080
1080- if len ( self . _sections ) > 5 :
1081- state_summary ["sections_truncated" ] = f"...and { len ( self . _sections ) - 5 } more"
1081+ if sections_count > 5 :
1082+ state_summary ["sections_truncated" ] = f"...and { sections_count - 5 } more"
10821083
10831084 return (f"<{ self .__class__ .__name__ } ("
10841085 f"params={ init_params } , "
Original file line number Diff line number Diff line change 11Implement :meth: `~object.__str__ ` and :meth: `~object.__repr__ `
2- for :class: `configparser.RawConfigParser ` objects
2+ for :class: `configparser.RawConfigParser ` objects.
You can’t perform that action at this time.
0 commit comments