Skip to content

Conversation

tqa236
Copy link
Contributor

@tqa236 tqa236 commented Feb 5, 2025

This is the preferred way to annotate starting from Python 3.9. All changes are auto-fixed by ruff

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

@tqa236
Copy link
Contributor Author

tqa236 commented Feb 5, 2025

apparently, there are some difference between typing.Type and type when Type[T] works as a Generic, so I'll close the PR

@tqa236 tqa236 closed this Feb 5, 2025
@tqa236 tqa236 deleted the pep585-annotation branch February 5, 2025 20:33
@Dr-Irv
Copy link
Contributor

Dr-Irv commented Feb 5, 2025

apparently, there are some difference between typing.Type and type when Type[T] works as a Generic, so I'll close the PR

I don't think that was your issue. typing.Type is deprecated, so Type[T] can be replaced with type[T]. Looking at the logs of the tests, you failed to get rid of all references to type_t throughout the source, and if you do that, you may be able to resurrect this.

@tqa236
Copy link
Contributor Author

tqa236 commented Feb 5, 2025

thanks for the comment, @Dr-Irv. I changed and tested it locally and it leads to a lot of other errors. Fixing them all would be tough so I'll try to see if there's a way to fix a subset of that first.

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