You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classBeaconsConfig(CollectConfigBase):
""" Configuration schema for the beacons collect plugin. """beacons: List[str]
asyncdefcollect(*, ctx: PipelineRunContext[BeaconsConfig]) ->AsyncIterator[BeaconCollectedEvent]:
""" Method called to collect events. """
PipelineRunContextConfigType=TypeVar("PipelineRunContextConfigType", bound=NonMutableConfig)
classPipelineRunContext(GenericModel, Generic[PipelineRunContextConfigType]):
""" Class representing a pipeline run context. """config: PipelineRunContextConfigType
The text was updated successfully, but these errors were encountered:
thanks for raising this issue here. To be honest, I have silently assumed that autodoc_pydantic handles generic models just as fine as normal pydantic models in the past. Just now I added an example in the documentation showing how generic models are rendered via autodoc_pydantic. Given the standard example from the pydantic docs, it just works fine.
Nevertheless, I'm pretty sure you've stumbled across an edge case where autodoc_pydantic might break the building process. However, I need your help to reproduce the error because I'm currently rather new to generics in python:
Could you please provide a complete self containing example? With the above, I don't know what NonMutableConfig is. Moreover, the saf.collect.beacons module seems to have a concrete implementation of PipelineRunContext with BeaconsConfig. This is not shown in your code example.
What sphinx/pydantic/autodoc_pydantic versions are you using?
The text was updated successfully, but these errors were encountered: