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
Added type annotations to streams.py and message.py #231
Conversation
Hi! Thanks for the PR, could you please remove your environment from the commit so we could look at the changed files? Maybe try the following command: |
Good morning,
Sure will do right now. Do I need to submit a new pull request?
Best,
Hiva
…On Fri, Jun 10, 2022 at 10:13 AM Sukrit Kalra ***@***.***> wrote:
Hi! Thanks for the PR, could you please remove your environment from the
commit so we could look at the changed files? Maybe try the following
command: git rm --cached -r my-env
—
Reply to this email directly, view it on GitHub
<#231 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVOVT3T3NWWQULAZ7E6ZR43VONZTJANCNFSM5YLYNARQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
No need for that, just add a new commit, and we can squash and merge the commits once the PR is ready. |
I just did. See if it's fixed. Sorry for the inconvenience. |
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.
Thanks for the PR. Please take a look at my comments:
Thank you for your comments. I have considered all the comments and changed my code accordingly. Please let me know if there's anything that I still have to fix. |
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.
Thanks for the changes! Please run the tools as I've suggested, and we can wait for @pschafhalter to approve the changes too.
python/erdos/message.py
Outdated
super(WatermarkMessage, self).__init__(timestamp, None) | ||
|
||
def __str__(self): | ||
def __str__(self) : |
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.
I'm not sure why the CI is not running. But, could you please run the following from your python
directory?
black .
isort --profile black .
flake8 --inline-quotes=double ./
and commit any changes that these tools make?
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.
We need to manually approve and run the CI because Hiva is a first-time committer.
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.
Thanks! @HivaMohammadzadeh1 the CI should now show the errors in formatting, please take a look and address the issues.
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.
Thank you! Will do.
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.
After running flake8 --inline-quotes=double ./
I get this error. Is this normal?
usage: flake8 [options] file file ...
flake8: error: unrecognized arguments: --inline-quotes=double
It does not show me any errors in formatting, so I think that error might not be normal.
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.
You probably have to install the inline-quotes
extension for flake8
. Try doing this on your shell (within the virtual environment):
pip install flake8-quotes
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.
Perfect that was the problem. I ran and resolved the issues and committed.
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.
A few small nits. Happy to merge once they're addressed and the formatting checks pass!
I just did the changes. The commands run on my end. I wonder why they don't on here. Thank you for being patient with me and helping me |
Hi! I had to manually approve the workflow. It seems like your formatter made some changes in |
Just committed again :) |
Yes, I figured it was doing that, so I didn't run |
Looks like its still failing, are these changes being made by I just ran a new installation of |
I just manually went and fixed it. Can you check if it works now? I didn't run |
Nope, still not working. I wonder why your |
I just ran |
Nope, just for reference, my black version is 22.6.0 and it seems to fix the errors being raised by the CI. |
I don't know why it's reformatting it wrong. |
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.
Fixed the formatting issues for you, but there's issues in the pythondoc that need to be fixed.
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.
LGTM. Thanks for the PR!
I added the type annotations to Streams.py and message.py and tested it from examples/simple_pipeline.py by adding and running the following code:
def f() -> Stream[int]:
pass
Still trying to figure out if I can add type annotations to split_by_type