@@ -316,12 +316,36 @@ def from_dict(cls, dct: dict) -> Self:
316316 return cls ((k , v ) for k , v in dct .items () if k in keys )
317317
318318
319+ """
320+ The following type annotations are only used in type checking
321+ (mypy) the ContribsClient.get_all_ids function.
322+ This function has highly hetereogeneous output and these
323+ represent the intermediate and final data structures returned
324+ by that function.
325+
326+ They **shouldn't** have to be used elsewhere.
327+ """
328+
319329ComponentIdSets = dict [str , set [str ]]
330+ """Use only when type checking of ContribsClient.get_all_ids(...,fmt="sets")."""
331+
320332ProjectIdSets = dict [str , set [str ] | ComponentIdSets ]
333+ """Use only when type checking of ContribsClient.get_all_ids(...,fmt="sets")."""
334+
321335AllIdSets = dict [str , ProjectIdSets ]
336+ """Use only when type checking of ContribsClient.get_all_ids(...,fmt="sets")."""
322337
323338ComponentNameMap = dict [str , dict [str , str ]]
339+ """Use only when type checking of ContribsClient.get_all_ids(...,fmt="map")."""
340+
324341IdentifierLeaf = dict [str , str | ComponentNameMap ]
342+ """Use only when type checking of ContribsClient.get_all_ids(...,fmt="map")."""
343+
325344IdentifierBranch = dict [str , IdentifierLeaf ]
345+ """Use only when type checking of ContribsClient.get_all_ids(...,fmt="map")."""
346+
326347ProjectIdMap = dict [str , IdentifierLeaf | IdentifierBranch ]
348+ """Use only when type checking of ContribsClient.get_all_ids(...,fmt="map")."""
349+
327350AllIdMap = dict [str , ProjectIdMap ]
351+ """Use only when type checking of ContribsClient.get_all_ids(...,fmt="map")."""
0 commit comments