Skip to content

refactor: avoid stringified type hints#168

Merged
FlorianDeconinck merged 1 commit into
NOAA-GFDL:developfrom
romanc:romanc/future-annotations
Jun 18, 2025
Merged

refactor: avoid stringified type hints#168
FlorianDeconinck merged 1 commit into
NOAA-GFDL:developfrom
romanc:romanc/future-annotations

Conversation

@romanc
Copy link
Copy Markdown
Collaborator

@romanc romanc commented Jun 18, 2025

Description

The future is here. We don't have to rely on stringified type hints anymore. Instead, we can use from __future__ import annotations to have python parse the code twice (once to register all types and then another time to actually check).

How Has This Been Tested?

All good as long as CI is still green.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas: N/A
  • I have made corresponding changes to the documentation: N/A
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules: N/A
  • New check tests, if applicable, are included: N/A

Copy link
Copy Markdown
Collaborator

@FlorianDeconinck FlorianDeconinck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

"The future is here". Nice.

@FlorianDeconinck FlorianDeconinck merged commit 5cb01cc into NOAA-GFDL:develop Jun 18, 2025
5 checks passed
@romanc romanc deleted the romanc/future-annotations branch June 18, 2025 14:03
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.

3 participants