Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use modern-style type hints #1632

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

romanc
Copy link
Contributor

@romanc romanc commented Sep 6, 2024

Description

In the past, the only way to create type hints for yet-to-be-defined types was to quote them. Since python 3.7 we can get rid of the quotes when using annotations from __future__ instead. This is supposed to become the default in the future.

This PR is a spin-off from #1630 (comment).

Requirements

  • All fixes and/or new features come with corresponding tests.
  • Important design decisions have been documented in the approriate ADR inside the docs/development/ADRs/ folder.

If this PR contains code authored by new contributors please make sure:

  • The PR contains an updated version of the AUTHORS.md file adding the names of all the new contributors.

In the past, the only way to create type hints for yet-to-be-defined
types was to quote them. Since python 3.7 we can get rid of the quotes
when using `annotations` from `__future__` instead. This is supposed to
become the default in the future.
@romanc
Copy link
Contributor Author

romanc commented Sep 6, 2024

/cc @egparedes

@FlorianDeconinck FYI as mentioned earlier

@FlorianDeconinck
Copy link
Contributor

The Great Cleanup continues. All we be cleansed!

@egparedes
Copy link
Contributor

cscs-ci run

Copy link
Contributor

@egparedes egparedes left a comment

Choose a reason for hiding this comment

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

LGTM

@romanc
Copy link
Contributor Author

romanc commented Sep 10, 2024

Thanks for running cscs-ci and approving. Please merge whenever is convenient for you (since I don't have write access to this repo) or let me know if you want me to rebase the PR on top of latest changes in main.

@egparedes egparedes merged commit fe8349e into GridTools:main Sep 11, 2024
51 checks passed
@romanc romanc deleted the romanc/annotations branch September 11, 2024 08:08
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