[Type] ndarray typing 1: Add eval_str=True to inspect.signature() calls#411
[Type] ndarray typing 1: Add eval_str=True to inspect.signature() calls#411hughperkins wants to merge 5 commits intomainfrom
Conversation
…annotations Support `from __future__ import annotations` by resolving stringified type annotations at signature inspection time. Catch NameError from invalid string annotations and raise a clear QuadrantsSyntaxError.
|
Opus 4.6 review: PR Review: hp/typing-t4-1-eval-strSummaryThis PR adds Issues Found1. Inconsistent
|
The register decorator's inspect.signature() call was missing eval_str=True, inconsistent with all other call sites.
Wrap all inspect.signature(eval_str=True) calls with try/except that catches both NameError and AttributeError, re-raising as QuadrantsSyntaxError for clear user-facing errors. Previously only check_parameter_annotations had error handling and it only caught NameError.
Centralize the inspect.signature(eval_str=True) + error handling pattern into a shared get_func_signature() helper in exception.py, replacing 5 inline try/except blocks across _func_base.py, _kernel_impl_dataclass.py, and _perf_dispatch.py.
Verify that kernel parameter annotations are correctly resolved when the module uses PEP 563 stringified annotations.
…annotations
Support
from __future__ import annotationsby resolving stringified type annotations at signature inspection time. Catch NameError from invalid string annotations and raise a clear QuadrantsSyntaxError.Issue: #
Brief Summary
copilot:summary
Walkthrough
copilot:walkthrough