feat: implement PEP 649 / 749 deferred evaluation of annotations#134
feat: implement PEP 649 / 749 deferred evaluation of annotations#134
Conversation
Implemented support for deferred evaluation of `__annotations__` by dynamically generating `get_annotations_for_{name}()` helper functions for modules, classes, and functions, returning `map[string]string`. Modified attribute and name transpilation to map `__annotations__` access to these helpers. Checked off task in `todo2.md`.
Co-authored-by: yaskhan <3676373+yaskhan@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Added explicit `Dict[str, str]` annotations to `func_annotations`, `class_annotations`, and `mod_annotations` dictionaries to fix `mypy --check-untyped-defs` CI failures introduced in the PEP 649 / 749 implementation. Co-authored-by: yaskhan <3676373+yaskhan@users.noreply.github.com>
Co-authored-by: qwencoder <qwencoder@users.noreply.github.com>
|
Pull request #134 has conflicts that needs to be resolved. |
acc77f1 to
452ca3b
Compare
|
Pull request #134 has conflicts that needs to be resolved. |
Implemented support for deferred evaluation of
__annotations__(PEP 649 / 749). The transpiler now collects type annotations from module, class, and function levels, and dynamically generates V helper functions (e.g.,get_annotations_for_mystruct()) that construct and return amap[string]string. Attribute access (obj.__annotations__) and name access (__annotations__) are mapped to these helpers. This provides the correct expected behavior while saving memory compared to storing map instances on every V struct.PR created automatically by Jules for task 16837018923834780642 started by @yaskhan