-
Notifications
You must be signed in to change notification settings - Fork 1
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
Remove asyncio and upgrade dependencies #256
Conversation
5141cd6
to
295e1a5
Compare
295e1a5
to
611a9ba
Compare
params: dict = None, | ||
body: dict = None, | ||
): | ||
kwargs: dict = {"allow_redirects": False} |
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.
kwargs: dict = {"allow_redirects": False} | |
kwargs = {"allow_redirects": False} |
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.
No, otherwise mypy derives an implicit Dict[str, bool]
which clashes with the next lines of like kwargs["params"] = params
as params
is Dict[Any, Any]
. Using dict
makes it a Dict[Any, Any]
.
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.
Right, ok. Sometimes mypy is more complicated than necessary :D
croud/products/commands.py
Outdated
else: | ||
data, errors = client.send(RequestMethod.GET, url) | ||
params["kind"] = args.kind | ||
data, errors = client.get(url, params=params) |
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.
Nitpicking 😆
Passing None would be "more correct" as you do a None check in the request method.
data, errors = client.get(url, params=params) | |
data, errors = client.get(url, params={"kind": args.kind} if args.kind else None) |
code = 400 | ||
msg = SetTokenHandler.DUPLICATE_TOKEN_MSG | ||
else: | ||
token = query["token"][0] |
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.
Should we account for the edge case that the token parameter is present but the token is an empty string?
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.
611a9ba
to
ea92e23
Compare
Summary of the changes / Why this is an improvement
Checklist