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

Issue/10944 pep561 py typed 2 #12842

Merged
merged 3 commits into from
Sep 10, 2021

Conversation

kaos
Copy link
Member

@kaos kaos commented Sep 10, 2021

Closes #10944 Supersedes #12330, #12751

This adds py.typed to pantsbuild.pants and pantsbuild.pants.testutil, with integration test verifying that typecheck works as expected for both distributions.

I've verified that the tests fail as expected when excluding the dependency on the py_typed resource.

Signed-off-by: Andreas Stenius <andreas.stenius@svenskaspel.se>

[ci skip-rust]

[ci skip-build-wheels]
Signed-off-by: Andreas Stenius <andreas.stenius@svenskaspel.se>

# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
@kaos
Copy link
Member Author

kaos commented Sep 10, 2021

Added the cherry-pick label, as I think this is a rather unobtrusive change, but adds a much needed feature in order to write pants plugins effectively. Feel free to disagree ;)

Signed-off-by: Andreas Stenius <andreas.stenius@svenskaspel.se>

# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
@stuhood stuhood added this to the 2.7.x milestone Sep 10, 2021
Copy link
Sponsor Member

@stuhood stuhood left a comment

Choose a reason for hiding this comment

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

Looks great: thanks!

@stuhood stuhood merged commit 4f437a4 into pantsbuild:main Sep 10, 2021
Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

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

Woot, thanks!

@kaos kaos deleted the issue/10944_pep561_py_typed_2 branch September 10, 2021 17:49
kaos added a commit to kaos/pants that referenced this pull request Sep 12, 2021
…EP-561 (pantsbuild#12842)

Closes pantsbuild#10944 Supersedes pantsbuild#12330, pantsbuild#12751

This adds `py.typed` to `pantsbuild.pants` and `pantsbuild.pants.testutil`, with integration test verifying that typecheck works as expected for both distributions.

I've verified that the tests fail as expected when excluding the dependency on the `py_typed` resource.

(cherry picked from commit 4f437a4)

# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
Eric-Arellano pushed a commit that referenced this pull request Sep 13, 2021
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.

Mark pantsbuild.pants as PEP 561 compliant for type hints to work with plugin authors
3 participants