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

Should we use type hints? #7425

Open
CoconutMacaroon opened this issue Dec 27, 2022 · 1 comment
Open

Should we use type hints? #7425

CoconutMacaroon opened this issue Dec 27, 2022 · 1 comment
Labels
status: stale type: feedback wanted "Closed as too opinion-based."

Comments

@CoconutMacaroon
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Python has support for type hints. They have advantages (IDEs and other tools can help users avoid making type-related errors by checking, for one). I'm not aware of any major disadvantages currently (SD supports Python 3.6 and they were added in 3.5, so compatibility isn't a huge concern I think). Overall, I personally tend to like them as having my IDE verify I don't mess up types is handy.

Describe the solution you'd like

Use type hints on new code added to SD (and maybe some existing code, although I don't think that is really a priority).

Describe alternatives you've considered

N/A

Additional context

I asked if they should be used and Makyen said it would be reasonable to open an issue on GH to discuss it

@teward
Copy link
Member

teward commented Dec 27, 2022

Personal opinion: yes.

However implementation code-base wise will be complex and may introduce some headaches for syntax, etc. While generally I agree with us using type hinting, this is really a wider scale change than you think it is.

@teward teward added type: feedback wanted "Closed as too opinion-based." and removed type: question Huh? labels Dec 27, 2022
@stale stale bot added the status: stale label Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: stale type: feedback wanted "Closed as too opinion-based."
Development

No branches or pull requests

2 participants