json.dump/dumps shouldn't allow Any
when default
is None
#13781
Labels
stubs: false negative
Type checkers do not report an error, but should
Uh oh!
There was an error while loading. Please reload this page.
When
default
is None, we know what types are serialisable.Thus,
Shouldn't type-check.
Running this fails with:
Type-checking
JSONEncoder
itself would be much harder, but the more-commonly-used functions should be doable via overloads.The text was updated successfully, but these errors were encountered: