Skip to content

Conversation

@aaron-skydio
Copy link
Member

Update skymarshal Python code generation templates to use Python 3-style
inline type annotations instead of Python 2-style comment annotations.

Changes:

  • Update python_enum.py.template: convert all method signatures from
    # type: (args) -> return comments to inline (args: T) -> R syntax
  • Update python_struct.py.template: remove quotes from forward-reference
    return types (e.g., -> "Name" becomes -> Name)
  • Add from __future__ import annotations to wrapper templates
    (python_enum_default_wrapper.py.template and
    python_struct_default_wrapper.py.template) to enable PEP 563
    postponed annotation evaluation

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

Topic: skymarshal-py3-annotations

Update skymarshal Python code generation templates to use Python 3-style
inline type annotations instead of Python 2-style comment annotations.

Changes:
- Update python_enum.py.template: convert all method signatures from
  `# type: (args) -> return` comments to inline `(args: T) -> R` syntax
- Update python_struct.py.template: remove quotes from forward-reference
  return types (e.g., `-> "Name"` becomes `-> Name`)
- Add `from __future__ import annotations` to wrapper templates
  (python_enum_default_wrapper.py.template and
  python_struct_default_wrapper.py.template) to enable PEP 563
  postponed annotation evaluation

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

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

Reviews in this chain:
#451 Convert skymarshal templates from py2 to py3 style annotations

@aaron-skydio
Copy link
Member Author

# head base diff date summary
0 1beb1e31 f9420dc8 diff Dec 26 15:25 PM 40 files changed, 275 insertions(+), 209 deletions(-)

asa pushed a commit to asa/symforce that referenced this pull request Jan 23, 2026
…e annotations

Convert skymarshal templates from py2 to py3 style annotations

Update skymarshal Python code generation templates to use Python 3-style
inline type annotations instead of Python 2-style comment annotations.

Changes:
- Update python_enum.py.template: convert all method signatures from
  `# type: (args) -> return` comments to inline `(args: T) -> R` syntax
- Update python_struct.py.template: remove quotes from forward-reference
  return types (e.g., `-> "Name"` becomes `-> Name`)
- Add `from __future__ import annotations` to wrapper templates
  (python_enum_default_wrapper.py.template and
  python_struct_default_wrapper.py.template) to enable PEP 563
  postponed annotation evaluation

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Topic: skymarshal-py3-annotations
Closes symforce-org/symforce#451
GitOrigin-RevId: 59feda7d816d6ad99c1de193a7716a1065038fff
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