Skip to content

Fix incorrect return annotation in asyncio.lock #2155

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

Merged
merged 1 commit into from
May 2, 2022

Conversation

JelleZijlstra
Copy link
Contributor

Pull Request check-list

Please make sure to review and check all of these items:

  • Does $ tox pass with this change (including linting)?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?
  • Was the change added to CHANGES file?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

Description of change

NoReturn should be used only when the function never returns. In this case, the awaitable returns None if releasing the lock succeeds, so Awaitable[None] is right.

Noticed this while reviewing python/typeshed#7676

NoReturn should be used only when the function never returns. In this case, the awaitable returns None if releasing the lock succeeds, so `Awaitable[None]` is right.

Noticed this while reviewing python/typeshed#7676
@codecov-commenter
Copy link

codecov-commenter commented Apr 30, 2022

Codecov Report

Merging #2155 (b452c03) into master (40fdb15) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #2155   +/-   ##
=======================================
  Coverage   92.50%   92.50%           
=======================================
  Files         105      105           
  Lines       25191    25191           
=======================================
  Hits        23303    23303           
  Misses       1888     1888           
Impacted Files Coverage Δ
redis/asyncio/lock.py 99.12% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 40fdb15...b452c03. Read the comment docs.

@chayim chayim added the maintenance Maintenance (CI, Releases, etc) label May 2, 2022
@chayim
Copy link
Contributor

chayim commented May 2, 2022

Thank you @JelleZijlstra this is great! We'd love to get everything, properly typed, inserting a py.typed when ready. Keep 'em coming!

@chayim chayim merged commit eca7075 into redis:master May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Maintenance (CI, Releases, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants