TYP: Return annotations for io/{formats,json}
Looks good. It'd be good to have an issue about this for more context, and to somehow group the different issues in this effort. Also to add to the CI the validation you're using to find those. Does this make sense to you? > It'd be good to have an issue about this for more context

I will create an issue later today about it (many of these annotations could be easy first contributions). Inspired by @MarcoGorelli's #47497 I'm using pyright to find missing return annotations that it can infer. While this doesn't help pyright much (it infers them already), it helps mypy, and in some cases it also helps pyright (when pyright infers a Union (might be an overload) or infers Any/Unknown (might be able to find a narrower type).


> Also to add to the CI the validation you're using to find those.

At the moment I'm just doing:

```sh
pyright --createstub pandas
grep -R "# -> " typings/pandas/
```
and then see which cases I feel comfortable annotating.

In terms of integrating something like that into the CI:

- [soon'ish?] @MarcoGorelli's #47497 hook could be a way to catch some of the missing return values
- [in a few blue moons] If all functions have tight returns values, we have one fewer discrepancy between mypy and pyright: might be able to remove [`--skipunannotated`](https://github.com/pandas-dev/pandas/blob/7d2f9b8d59908fbf57c6453bc41891efbfe981a6/.pre-commit-config.yaml#L101) run reportGeneralTypeIssues on all files (or the subset of files that currently pass). This would only catch missing return annotations that cause pyright to report errors.
- [in many blue moons] Using #39813 > Inspired by @MarcoGorelli's https://github.com/pandas-dev/pandas/pull/47497 I'm using pyright to find missing return annotations that it can infer.

Nice! Does this obliviate the need for #47497 and associated tool, or does pyright not find some obvious `-> None` statements? > Does this obliviate the need for #47497 and associated tool, or does pyright not find some obvious `-> None` statements?

Pyright is really good at inferring types :) but `--createstubs` does not care about private functions. Your hook is not only helpful to cover private functions but it is also helpful to enforce obvious `-> None` annotations. I believe that even #39813 (`--verifytypes`) does not enforce unannotated private functions. Thanks @twoertwein As @datapythonista mentioned, would be good to have a general issue about this pyright specific check. Opened #47521