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

Add type hints to binding_generator.py #1365

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Repiteo
Copy link
Contributor

@Repiteo Repiteo commented Jan 18, 2024

Makes the main binding file a bit easier to parse by assigning the relevant type hints. The only real change to the script itself were splitting some variables that previously represented multiple types & making the default meta argument "" instead of None so I didn't have to add any Optional type wrappers.

@Repiteo Repiteo requested a review from a team as a code owner January 18, 2024 21:46
@dsnopek
Copy link
Contributor

dsnopek commented Jan 19, 2024

Thanks!

Personally, I have kind of mixed feelings about this. I like typehints, but if we commit to fully typehinting everything, I think it raises the bar somewhat on contributing. This is something that the GDExtension team will need to discuss to decide if we want to do this. I'll add it to the agenda for the next meeting, just in case we don't manage to discuss it here first. :-)

@dsnopek
Copy link
Contributor

dsnopek commented Jan 26, 2024

Discussed at the GDExtension meeting, and we agreed that we'd like to follow Godot's lead on this. So, we should have a wider discussion on if we want to use typehints in Godot's Python code in general (and then godot-cpp will follow that decision).

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.

None yet

2 participants