Skip to content

Conversation

@aaron-skydio
Copy link
Member

Update jinja templates to generate Python 3-style inline type annotations
instead of Python 2-style comment annotations (# type: ...).

Changes:

  • Update function_declaration macro in util.jinja to use inline annotations
  • Add from __future__ import annotations to all Python templates for
    postponed annotation evaluation (PEP 563)
  • Convert all method signatures in geo_package/CLASS.py.jinja and
    cam_package/CLASS.py.jinja to py3-style
  • Update custom_methods templates (rot2, rot3, pose2, pose3, unit3)
  • Update ops templates (group_ops, lie_group_ops, camera_ops)
  • Format function parameters with 4-space indentation, no trailing comma
  • Remove unnecessary blank lines before "# Total ops:" comments
  • Order ruff noqa comments before future imports

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 [email protected]

Topic: py3-annotations

Update jinja templates to generate Python 3-style inline type annotations
instead of Python 2-style comment annotations (# type: ...).

Changes:
- Update function_declaration macro in util.jinja to use inline annotations
- Add `from __future__ import annotations` to all Python templates for
  postponed annotation evaluation (PEP 563)
- Convert all method signatures in geo_package/CLASS.py.jinja and
  cam_package/CLASS.py.jinja to py3-style
- Update custom_methods templates (rot2, rot3, pose2, pose3, unit3)
- Update ops templates (group_ops, lie_group_ops, camera_ops)
- Format function parameters with 4-space indentation, no trailing comma
- Remove unnecessary blank lines before "# Total ops:" comments
- Order ruff noqa comments before future imports

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>

Topic: py3-annotations
@aaron-skydio
Copy link
Member Author

Reviews in this chain:
#450 Convert Python codegen templates from py2 to py3 style annotations

@aaron-skydio
Copy link
Member Author

aaron-skydio commented Dec 24, 2025

# head base diff date summary
0 486f6eb6 f9420dc8 diff Dec 23 18:49 PM 59 files changed, 890 insertions(+), 1124 deletions(-)
1 cbbc146c f9420dc8 diff Dec 26 15:25 PM 6 files changed, 34 insertions(+), 24 deletions(-)

@aaron-skydio aaron-skydio force-pushed the aaron/revup/main/py3-annotations branch from 486f6eb to cbbc146 Compare December 26, 2025 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants