typeshed icon indicating copy to clipboard operation
typeshed copied to clipboard

usjon: Add default keyword argument

Open antoniobusrod opened this issue 2 years ago • 3 comments

Add missing default keyword argument to dump and dumps functions.

Introduced since https://github.com/ultrajson/ultrajson/releases/tag/4.2.0

Relates to https://github.com/ultrajson/ultrajson/pull/470

antoniobusrod avatar Sep 12 '22 09:09 antoniobusrod

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

github-actions[bot] avatar Sep 12 '22 09:09 github-actions[bot]

It also seems like most of the arguments are keyword-only, even though they aren't marked as keyword-only in the stub:

>>> ujson.dump({'a': object()}, sys.stdout, True, 1, True, True, True, 1, (lambda x: "lol"))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: function takes exactly 2 arguments (9 given)

We can fix this in a separate pull request.

Akuli avatar Sep 12 '22 09:09 Akuli

Could you address @Akuli's feedback?

JelleZijlstra avatar Sep 21 '22 23:09 JelleZijlstra

Closing due to lack of response from OP

AlexWaygood avatar Dec 12 '22 17:12 AlexWaygood