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 Hint.coerce_type not recognising falsey statements #126

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Ultrasonic1209
Copy link

@Ultrasonic1209 Ultrasonic1209 commented Sep 4, 2022

Describe what bug you fixed
This PR fixes Hint.coerce_type so that it correctly recognises falsey statements.

Checklist

  • I've already read the contributing guide.
  • I've run all tests and make sure all exists test cases are passed.
  • I've make sure this PR works with Sanic-18.12 and Python-3.5.

@Ultrasonic1209 Ultrasonic1209 changed the title Main Fix Hint.coerce_type not recognising falsey statements Sep 4, 2022
@ahopkins ahopkins marked this pull request as draft September 4, 2022 12:45
@ahopkins
Copy link
Member

ahopkins commented Sep 4, 2022

This still needs some more work to handle

    @dataclass
    class Query:
        maybe: Optional[bool] = None

And particularly when dealing with [None].

@ahopkins ahopkins self-assigned this Sep 4, 2022
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