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

fix: More accurate type hints for Python @planning_entity #1272

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

luxaritas
Copy link
Contributor

Resolves #1265

@triceo
Copy link
Contributor

triceo commented Dec 11, 2024

Thank you for your contribution, @luxaritas!

We are a bit short-handed at the moment, with many people already taking their year-end holidays. I'm going to leave this one open until my colleague, who owns the Python part of the codebase, comes back in early January and does a code review.

Please be patient - we have every intention to merge this PR.

Copy link
Contributor

@Christopher-Chianelli Christopher-Chianelli left a comment

Choose a reason for hiding this comment

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

LGTM, although the same change probably should be done for planning_solution (since that another decorator that has optional parameters); I can do that change myself. Unfortunately even with these changes, this won't do anything for PyCharm Intelisense (all lambda parameters are treated as Any in PyCharm in its custom type resolver; see this PyCharm issue for details).

@triceo triceo merged commit 6271534 into TimefoldAI:main Jan 6, 2025
28 checks passed
@triceo
Copy link
Contributor

triceo commented Jan 6, 2025

Thank you for the contribution, @luxaritas!
The next release is coming up next week.

@luxaritas luxaritas deleted the planning-entity-generic branch January 6, 2025 23:24
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.

Python type hints partially broken for @planning_entity classes
3 participants