-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
annotated zerver.lib.email_mirror #940
annotated zerver.lib.email_mirror #940
Conversation
Automated message from Dropbox CLA bot @medullaskyline, it looks like you've already signed the Dropbox CLA. Thanks! |
c6f4e40
to
2847333
Compare
import six | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
def redact_stream(error_message): | ||
# type:(str) -> str |
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.
There should be a space between the :
and (
in these annotations; can you fix that everywhere?
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.
Done, thanks. :)
347b600
to
98943c5
Compare
@@ -72,6 +79,7 @@ def get_missed_message_token_from_address(address): | |||
return msg_string[2:] | |||
|
|||
def create_missed_message_address(user_profile, message): | |||
# type: (UserProfile, UserMessage) -> str |
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 think message here is a Zulip Message
from zerver.models (not a UserMessage)
2bb76df
to
429ee92
Compare
Error message for the python 3.5 build: |
Shouldn't you be using |
The email issue is arising because typeshed is missing stubs for Until the issue is resolved, you can silence this error somehow. Generally errors are silenced using This has the advantage that you won't have to update this line when stubs are added to typeshed. |
@sharmaeklavya2 that hack makes sense to me. @medullaskyline are you likely to have time to finish this PR up in the near future? |
@timabbott Sure I can finish it tonight. |
38c3a5e
to
d999a5e
Compare
@timabbott @sharmaeklavya2 Looks like it's done, thanks for your help! |
It looks like there are parameters in your pull request which should be annotated as |
It has been discussed here that it's better to do |
@@ -28,11 +32,13 @@ def redact_stream(error_message): | |||
return error_message | |||
|
|||
def report_to_zulip(error_message): | |||
# type: (str) -> None |
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.
error_message
should be text_type
instead of str
.
You should change most strings' type from |
@medullaskyline just wanted to check in on whether you're planning to finish this? |
ab92c88
to
55957a0
Compare
return 'missed_message:' + token | ||
|
||
|
||
def is_missed_message_address(address): | ||
# type: (str) -> bool |
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 believe address
here is an email address. So it should be typed as text_type
.
We have a commit message guideline. Something like |
I think all |
Merged via #1073, thanks @medullaskyline for annotating this! |
No description provided.