question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mypy: Unexpected keyword argument

See original GitHub issue

Hi,

This is very cool!

Unfortunately, when I use mypy, I get Unexpected keyword argument when I try to return a @serdeed class from a function. I’m not sure if serde would need to have a mypy plugin or if I’m making a mistake.

I can make a minimal test case if needed.

Thank you!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
yukinaritcommented, Apr 3, 2022

@gitpushdashf should be no problem! 👍

0reactions
gitpushdashfcommented, Apr 5, 2022

Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mypy returns Error "Unexpected keyword argument" for ...
Your code is correct and should work. If I run the following simplified version: import attr @attr.s(kw_only=True) class Entity: """ base ...
Read more >
Suggest using Protocol when user tries to use keyword args ...
If I define a passed in function using the Callable syntax, mypy complains if I then call a keyword argument on that function....
Read more >
python/mypy - Gitter
I am using mypy 0.610 together with dataclasses. ... Unexpected keyword argument “field" for “Dataclass” or error:Too many arguments for “Dataclass” .
Read more >
Common issues and solutions - mypy 0.991 documentation
Common issues and solutions#. This section has examples of cases when you need to update your code to use static typing, and ideas...
Read more >
PEP 692 – Using TypedDict for more precise **kwargs typing
means that all keyword arguments in foo are strings (i.e., kwargs is of type dict[str, str] ). This behaviour limits the ability to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found