-
Notifications
You must be signed in to change notification settings - Fork 600
Add-pep561-pytyped #5855
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
base: main
Are you sure you want to change the base?
Add-pep561-pytyped #5855
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds PEP 561 compliance to the flet package by introducing a py.typed marker file and configuring setuptools to include it in distributions, enabling type checkers like mypy and Pylance to recognize inline type annotations.
- Added empty
py.typedmarker file in the flet package - Configured setuptools to include the
py.typedfile in package distributions - Explicitly configured package discovery for the src layout
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| sdk/python/packages/flet/src/flet/py.typed | Empty marker file required by PEP 561 for typed packages |
| sdk/python/packages/flet/pyproject.toml | Added setuptools configuration for package discovery and to include py.typed in package data |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thanks for your contribution. Can you please have a look at failing CI ? |
|
Hi, thanks for reviewing! Sorry, I haven't been working with setuptools recently, so I'm not sure which version Flet uses to build. Since setuptools v69.0.0, py.typed can be included automatically:
If that's the case, we might not need to include these options in |
I built the pretty obvious, since we don't constrain it anywhere.
I guess, yh. |
a1a425e to
4aecf2a
Compare
4aecf2a to
5688bfe
Compare
|
Hi @ndonkoHenri I have cleaned up the PR to include only the |
|
I personally dont see the issue you are trying to solve on my vscode. can you share a screenshot of how it appears from your IDE? I will suggest you give it a try to see if it fixes your issue:
|
Description
This PR adds PEP 561 type information support for the flet package.
Fixes #5854
Test Code
Type of change
Checklist
Screenshots
(Not applicable)
Additional details
PEP 561 requires a
py.typedmarker file for typed packages. The file is intentionally empty. This change does not modify runtime behavior