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: Fix Annotated + strawberry.lazy + deferred annotations #3507

Merged
merged 2 commits into from
May 22, 2024

Conversation

bellini666
Copy link
Member

Fix #3491

@bellini666 bellini666 self-assigned this May 22, 2024
@bellini666 bellini666 requested a review from patrick91 May 22, 2024 13:26
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 @bellini666 - 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: 1 issue found
  • 🟢 Complexity: 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.

tests/utils/test_typing.py Show resolved Hide resolved
@botberry
Copy link
Member

botberry commented May 22, 2024

Thanks for adding the RELEASE.md file!

Here's a preview of the changelog:


This release fixes an issue when using Annotated + strawberry.lazy +
deferred annotations such as:

from __future__ import annotations
import strawberry
from typing import Annotated


@strawberry.type
class Query:
    a: Annotated["datetime", strawberry.lazy("datetime")]


schema = strawberry.Schema(Query)

Before this would only work if datetime was not inside quotes. Now it should
work as expected!

Here's the tweet text:

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

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

Copy link

codecov bot commented May 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.51%. Comparing base (fc322a8) to head (4f79ec0).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3507   +/-   ##
=======================================
  Coverage   96.51%   96.51%           
=======================================
  Files         511      511           
  Lines       32965    32973    +8     
  Branches     5482     5484    +2     
=======================================
+ Hits        31815    31825   +10     
+ Misses        917      915    -2     
  Partials      233      233           

@bellini666 bellini666 force-pushed the fix_annotated_with_deferred_annotations branch from bbd1870 to f960901 Compare May 22, 2024 13:33
Copy link

codspeed-hq bot commented May 22, 2024

CodSpeed Performance Report

Merging #3507 will not alter performance

Comparing fix_annotated_with_deferred_annotations (4f79ec0) with main (fc322a8)

Summary

✅ 12 untouched benchmarks

@patrick91
Copy link
Member

🔥

@patrick91 patrick91 self-requested a review May 22, 2024 13:42
@bellini666 bellini666 force-pushed the fix_annotated_with_deferred_annotations branch from f960901 to 89efe33 Compare May 22, 2024 14:09
@patrick91 patrick91 merged commit 8b30e07 into main May 22, 2024
64 checks passed
@patrick91 patrick91 deleted the fix_annotated_with_deferred_annotations branch May 22, 2024 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants