mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-19 10:21:14 +08:00
Mark simplejson as completed (#9211)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
simplejson.JSONDecodeError.__init__
|
||||
simplejson.JSONDecoder.__init__
|
||||
simplejson.JSONDecoder.decode
|
||||
simplejson.JSONDecoder.raw_decode
|
||||
simplejson.JSONEncoder.__init__
|
||||
simplejson.decoder.JSONDecoder.__init__
|
||||
simplejson.decoder.JSONDecoder.decode
|
||||
simplejson.decoder.JSONDecoder.raw_decode
|
||||
simplejson.dump
|
||||
simplejson.dumps
|
||||
simplejson.encoder.JSONEncoder.__init__
|
||||
simplejson.load
|
||||
simplejson.loads
|
||||
# Speedups (C vs Python inconsistency):
|
||||
simplejson.scanner.make_scanner
|
||||
simplejson.scanner.JSONDecodeError.__init__
|
||||
simplejson.JSONDecodeError.__init__
|
||||
|
||||
# Tests are not included:
|
||||
simplejson.tests.*
|
||||
|
||||
# Internal and compat tools:
|
||||
simplejson.compat
|
||||
simplejson.ordered_dict
|
||||
simplejson.tool
|
||||
simplejson.OrderedDict
|
||||
|
||||
16
stubs/simplejson/@tests/test_cases/check_simplejson.py
Normal file
16
stubs/simplejson/@tests/test_cases/check_simplejson.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing_extensions import assert_type
|
||||
|
||||
from simplejson import JSONEncoder, dumps
|
||||
|
||||
|
||||
class CustomEncoder(JSONEncoder): # eventhough it does not have `extra_kw` arg.
|
||||
...
|
||||
|
||||
|
||||
# We are only testing `dumps` here, because they are all the same:
|
||||
dumps([], extra_kw=True) # type: ignore
|
||||
|
||||
# Ok:
|
||||
assert_type(dumps([], cls=CustomEncoder, extra_kw=True), str)
|
||||
Reference in New Issue
Block a user