"""Defines structural types (Protocols) for use in type hinting across arguslib.This helps decouple interfaces from concrete implementations, preventing circularimports and improving static analysis."""importdatetimeimportnumpyasnpfromtypingimportProtocol,runtime_checkable
[docs]@runtime_checkableclassProvidesRadarScanTime(Protocol):"""A protocol for instruments that can provide radar scan start and end times."""
[docs]defget_scan_time_bounds(self,dt:datetime.datetime)->tuple[datetime.datetime,datetime.datetime]:"""Returns the UTC start and end time of the radar scan corresponding to dt."""...
[docs]@runtime_checkableclassDirectRenderable(Protocol):"""A protocol for instruments that render directly to an image array. This contract is for instruments that do not use Matplotlib for plotting. Their `show` and `annotate_positions` methods operate on an internal image buffer and do not return an Axes object. The final image can be retrieved via `to_image_array()`. """