-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Enable mypy attr defined #10923
Enable mypy attr defined #10923
Conversation
f2d2530
to
f684937
Compare
0be3b5d
to
a2cb6b7
Compare
@joejuzl I'm almost done on this PR and I need your help to figure the last type issue:
Do you have another idea? |
Can you cast |
will give a try to those 👍🏻 |
I went with the |
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.
🚀
@@ -162,7 +162,10 @@ class GCSPersistor(Persistor): | |||
Fetches them when needed, instead of storing them on the local disk.""" | |||
|
|||
def __init__(self, bucket_name: Text) -> None: | |||
from google.cloud import storage | |||
"""Initialise class with client and bucket.""" | |||
# there are no type hints in this repo for now |
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.
To double-check I understand this correctly, if there's 3rd party code without type hints without type hints, mypy will complain?
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.
yes exactly. It's enabled by
Line 43 in 348697b
disallow_untyped_calls = True |
@m-vdb I've just merged
|
@m-vdb edit: running |
👍🏻 yeah, sorry I didn't mention that you needed to run |
Proposed changes:
mypy
attr-defined
error code #9098Status (please check what you already did):
black
(please check Readme for instructions)