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

[WIP] Run com2ann on Python SDK #17109

Closed
wants to merge 7 commits into from
Closed

Conversation

TheNeuralBit
Copy link
Member

@TheNeuralBit TheNeuralBit commented Mar 16, 2022

Run com2ann on the entire Python SDK, to convert all typehints in comments to annotations.

find sdks/python/apache_beam -name '*.py' | xargs -P8 -I{} com2ann {}

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests

See CI.md for more information about GitHub Actions CI.

@@ -782,17 +756,15 @@ def _from_normal_time(self, value):
"""Convert signed to "lexicographically ordered unsigned"."""
return value + _TIME_SHIFT

def encode_to_stream(self, value, out, nested):
# type: (IntervalWindow, create_OutputStream, bool) -> None
def encode_to_stream(self, value: IntervalWindow, out: create_OutputStream, nested: bool) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks wrong...

Copy link
Member Author

Choose a reason for hiding this comment

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

The annotation is consistent with the original comment, what looks wrong?

Copy link
Contributor

Choose a reason for hiding this comment

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

create_OutputStream is not (necessarily) a type. I think it's possible that the comment was wrong. (Either that or perhaps create_OutputStream should be renamed to OutputStreamType.)

@TheNeuralBit
Copy link
Member Author

I think we'll need to run yapf on the whole codebase to get this in. Would you be ok with that @robertwb? It will likely make a lot of odd formatting decisions that we can't review manually

@robertwb
Copy link
Contributor

robertwb commented Jun 7, 2022

We already ran yapf on the full codebase, right? Yes, I think we need to bite the bullet and to this.

@github-actions
Copy link
Contributor

This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@beam.apache.org list. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jun 17, 2023
@github-actions
Copy link
Contributor

This pull request has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.

@github-actions github-actions bot closed this Jun 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants