Skip to content

Type hints and type comments#84

Open
Avasam wants to merge 9 commits intoasweigart:masterfrom
Avasam:py.typed
Open

Type hints and type comments#84
Avasam wants to merge 9 commits intoasweigart:masterfrom
Avasam:py.typed

Conversation

@Avasam
Copy link
Copy Markdown

@Avasam Avasam commented Sep 26, 2022

I've added python 3.4 compatible type comments to complete unknown types. And added the py.typed marker file so that type checkers like mypy, pyright and pytype know to use the inline types rather than looking for type stubs.

Validated against Typeshed's CI: Avasam/typeshed#2

In the second commit, I've also added a script in tests to run type-checking with both mypy and Pyright, for convenience.

@Avasam
Copy link
Copy Markdown
Author

Avasam commented Jul 8, 2023

Fixed conflicts, @asweigart could I get a review on this?

@Avasam
Copy link
Copy Markdown
Author

Avasam commented Aug 18, 2024

@asweigart bump

long_description=long_description,
license="MIT",
packages=["pyscreeze"],
package_data={"pyscreeze": ["pyscreeze/py.typed"]},
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Alternatively we can add a lower-bound pin on setuptools to https://setuptools.pypa.io/en/latest/history.html#v69-0-0 , where py.typed files are picked-up by default.

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.

1 participant