Jukka Lehtosalo
Jukka Lehtosalo
I'm not a fan of having a "partial" JSON type that soon degenerates into `Any`. Type checkers would enforce things inconsistently. As soon as you descent into a JSON object...
I forgot to confirm that mypy doesn't support the kinds of recursive types discussed above, and there are no concrete plans to implement them. @brettcannon I agree that JSON values...
I suggest that even if we add the type to the module, we wouldn't use it as the return type of the load functions, at least for now (I discussed...
If it returns `JSONType` then the first thing any code needs to do is to run an `isinstance` check for the returned value, as due to being a union, most...
Mypy complains about your code because `__contains__` should accept an argument of type `object`. It's debatable whether this is the right thing to do, but that's how it's specified in...
`Intersection[...]` gets tricky once you consider type variables, callable types and all the other more special types as items. An intersection type that only supports protocols would be too special...
I agree that now's not the right time to add intersection types, but it may make sense later.
Have you tried defining a custom protocol which subclasses the relevant protocols? Or you can explicitly define all the methods you care about in a custom protocol.
@erictraut is correct, a `#type: ignore` comment should only suppress errors on the line, so the proposed feature is a reasonable one. If you know which code is type checked...
## Focus area update Currently loop/list/integer heavy code can be quite slow relative to lower-level languages. We are faster than CPython, but major performance improvements seem possible here. Promising improvements...