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

Improve jsonfield type hint #1700

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

waketzheng
Copy link
Contributor

if isinstance(value, (str, bytes)):

Seems that value can be bytes, but

self, value: Optional[Union[dict, list, str]], instance: "Union[Type[Model], Model]"

type hint of value does not include bytes

@coveralls
Copy link

Pull Request Test Coverage Report for Build 10547447347

Details

  • 9 of 10 (90.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 89.011%

Changes Missing Coverage Covered Lines Changed/Added Lines %
tortoise/fields/data.py 9 10 90.0%
Totals Coverage Status
Change from base Build 10521608081: -0.01%
Covered Lines: 5965
Relevant Lines: 6586

💛 - Coveralls

@abondar abondar merged commit 34eee2d into tortoise:develop Aug 27, 2024
7 checks passed
@waketzheng waketzheng deleted the improve-jsonfield-type-hint branch September 3, 2024 07:18
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.

3 participants