(annotation: Any)
| 226 | |
| 227 | |
| 228 | def _unwrap_annotation(annotation: Any) -> Tuple[Any, ParamMeta | None]: |
| 229 | origin = get_origin(annotation) |
| 230 | if origin is Annotated: |
| 231 | args = get_args(annotation) |
| 232 | if not args: |
| 233 | return annotation, None |
| 234 | base = args[0] |
| 235 | meta = next((arg for arg in args[1:] if isinstance(arg, ParamMeta)), None) |
| 236 | return base, meta |
| 237 | return annotation, None |
| 238 | |
| 239 | |
| 240 | def _strip_optional(annotation: Any) -> Tuple[Any, bool]: |
no outgoing calls
no test coverage detected