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

Remove asyncio and upgrade dependencies #256

Merged
merged 8 commits into from
Dec 20, 2019
Merged

Remove asyncio and upgrade dependencies #256

merged 8 commits into from
Dec 20, 2019

Conversation

MarkusH
Copy link
Contributor

@MarkusH MarkusH commented Dec 19, 2019

Summary of the changes / Why this is an improvement

Checklist

  • CLA is signed

params: dict = None,
body: dict = None,
):
kwargs: dict = {"allow_redirects": False}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
kwargs: dict = {"allow_redirects": False}
kwargs = {"allow_redirects": False}

Copy link
Contributor Author

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].

Copy link
Contributor

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/api.py Outdated Show resolved Hide resolved
croud/api.py Outdated Show resolved Hide resolved
else:
data, errors = client.send(RequestMethod.GET, url)
params["kind"] = args.kind
data, errors = client.get(url, params=params)
Copy link
Contributor

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.

Suggested change
data, errors = client.get(url, params=params)
data, errors = client.get(url, params={"kind": args.kind} if args.kind else None)

croud/server.py Show resolved Hide resolved
croud/login.py Outdated Show resolved Hide resolved
code = 400
msg = SetTokenHandler.DUPLICATE_TOKEN_MSG
else:
token = query["token"][0]
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tests/conftest.py Outdated Show resolved Hide resolved
tests/conftest.py Outdated Show resolved Hide resolved
setup.py Show resolved Hide resolved
@MarkusH MarkusH merged commit ea92e23 into master Dec 20, 2019
@mergify mergify bot deleted the mh/remove-asyncio branch December 20, 2019 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants