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

Fix the asgi handler's scope argument type #3581

Merged
merged 2 commits into from
Jul 31, 2024

Conversation

DoctorJohn
Copy link
Member

@DoctorJohn DoctorJohn commented Jul 26, 2024

Description

This PR fixes a little type error I stumbled across while working on something unrelated. Didn't want to forget about it.

@patrick91 I believe this was accidentally done in #3546? Am I missing something here?

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Documentation

Summary by Sourcery

This pull request fixes a type error in the ASGI request handler by correcting the type of the scope argument. Additionally, it includes a RELEASE.md file to document the patch release.

  • Bug Fixes:
    • Corrected the type of the ASGI request handler's scope argument from Request to Scope.
  • Documentation:
    • Added a RELEASE.md file to document the patch release.

Copy link
Contributor

sourcery-ai bot commented Jul 26, 2024

Reviewer's Guide by Sourcery

This pull request addresses a type error in the ASGI handler by changing the 'scope' argument type from 'Request' to 'Scope'. Additionally, it removes unnecessary 'type: ignore' comments and adds a new release notes file to document the patch.

File-Level Changes

Files Changes
strawberry/asgi/__init__.py
RELEASE.md
Fixed a type error in the ASGI handler's 'scope' argument and documented the change in a new release notes file.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @DoctorJohn - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟡 Complexity: 1 issue found
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

strawberry/asgi/__init__.py Show resolved Hide resolved
@botberry
Copy link
Member

Thanks for adding the RELEASE.md file!

Here's a preview of the changelog:


This release fixes the type of the ASGI request handler's scope argument, making type checkers ever so slightly happier.

Here's the tweet text:

🆕 Release (next) is out! Thanks to @NucleonJohn for the PR 👏

Get it here 👉 https://strawberry.rocks/release/(next)

Copy link

codecov bot commented Jul 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.86%. Comparing base (34485a9) to head (cdadf18).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3581      +/-   ##
==========================================
- Coverage   96.58%   93.86%   -2.72%     
==========================================
  Files         526      522       -4     
  Lines       34028    32872    -1156     
  Branches     5624     3750    -1874     
==========================================
- Hits        32865    30856    -2009     
- Misses        926     1719     +793     
- Partials      237      297      +60     

Copy link

codspeed-hq bot commented Jul 26, 2024

CodSpeed Performance Report

Merging #3581 will not alter performance

Comparing DoctorJohn:fix-asgi-scope-type (cdadf18) with main (34485a9)

Summary

✅ 13 untouched benchmarks

@DoctorJohn DoctorJohn requested a review from bellini666 July 31, 2024 17:50
Copy link
Member

@bellini666 bellini666 left a comment

Choose a reason for hiding this comment

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

Noice!

Copy link
Member

@patrick91 patrick91 left a comment

Choose a reason for hiding this comment

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

Thanks!

@patrick91 patrick91 merged commit 7818c39 into strawberry-graphql:main Jul 31, 2024
112 of 113 checks passed
@DoctorJohn DoctorJohn deleted the fix-asgi-scope-type branch November 20, 2024 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants