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

Correct type for json_encoder argument #438

Merged
merged 1 commit into from
Sep 28, 2019
Merged

Correct type for json_encoder argument #438

merged 1 commit into from
Sep 28, 2019

Conversation

jdufresne
Copy link
Contributor

Per recent upstream fix to typeshed, json.dumps() cls argument should be
optional type JSONEncoder.

python/typeshed@8e0d288

Fixes mypy error:

jwt/api_jws.py:102: error: Argument "cls" to "dumps" has incompatible type "Optional[Callable[..., Any]]"; expected "Optional[Type[JSONEncoder]]"
jwt/api_jwt.py:61: error: Argument "cls" to "dumps" has incompatible type "Optional[Callable[..., Any]]"; expected "Optional[Type[JSONEncoder]]"

Per recent upstream fix to typeshed, json.dumps() cls argument should be
optional type JSONEncoder.

python/typeshed@8e0d288

Fixes mypy error:

    jwt/api_jws.py:102: error: Argument "cls" to "dumps" has incompatible type "Optional[Callable[..., Any]]"; expected "Optional[Type[JSONEncoder]]"
    jwt/api_jwt.py:61: error: Argument "cls" to "dumps" has incompatible type "Optional[Callable[..., Any]]"; expected "Optional[Type[JSONEncoder]]"
@coveralls
Copy link

coveralls commented Sep 28, 2019

Pull Request Test Coverage Report for Build 68

  • 2 of 2 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 76.757%

Totals Coverage Status
Change from base Build 62: 0.02%
Covered Lines: 2206
Relevant Lines: 2874

💛 - Coveralls

@jpadilla
Copy link
Owner

Thanks!

@jpadilla jpadilla merged commit 1b979a4 into jpadilla:master Sep 28, 2019
@jdufresne jdufresne deleted the json-type branch December 16, 2020 16:07
@jpadilla jpadilla added this to the v2.0.0 milestone Dec 21, 2020
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.

None yet

3 participants