`data._symcache`, impl a summary `.__repr__()`, avoids `Asset` causality issues
							parent
							
								
									3eb1bf8248
								
							
						
					
					
						commit
						6eced8ca67
					
				|  | @ -76,7 +76,7 @@ class SymbologyCache(Struct): | |||
| 
 | ||||
|     # all asset-money-systems descriptions as minimally defined by | ||||
|     # in `.accounting.Asset` | ||||
|     assets: dict[str, 'Asset'] = field(default_factory=dict) | ||||
|     assets: dict[str, Asset] = field(default_factory=dict) | ||||
| 
 | ||||
|     # backend-system pairs loaded in provider (schema) specific | ||||
|     # structs. | ||||
|  | @ -90,6 +90,18 @@ class SymbologyCache(Struct): | |||
|     # provided by the backend pkg. | ||||
|     mktmaps: dict[str, MktPair] = field(default_factory=dict) | ||||
| 
 | ||||
|     def pformat(self) -> str: | ||||
|         return ( | ||||
|             f'<{type(self).__name__}(\n' | ||||
|             f' .mod: {self.mod!r}\n' | ||||
|             f' .assets: {len(self.assets)!r}\n' | ||||
|             f' .pairs: {len(self.pairs)!r}\n' | ||||
|             f' .mktmaps: {len(self.mktmaps)!r}\n' | ||||
|             f')>' | ||||
|         ) | ||||
| 
 | ||||
|     __repr__ = pformat | ||||
| 
 | ||||
|     def write_config(self) -> None: | ||||
| 
 | ||||
|         # put the backend's pair-struct type ref at the top | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue