Code quality: Introduce and assert `incomplete` flag
Part of #11769
This finds 25 more modules with unannotated items (due to Incomplete) than our current pyright stricter config.
Currently, this script checks only third-party stubs. stdlib stubs would be a next step.
I'd rather not include a large amount of untested AST-processing code in our CI scripts. Perhaps we could instead use pyright's library completeness score, or the similar logic from https://github.com/alexwaygood/typeshed-stats.
May I suggest going for a config name less vague than incomplete ? Maybe incomplete_annotations ? fully_annotated ?
Since the concepts of completeness/partialness can mean different concrete things depending on the context: pyright (Unknown), mypy (un/annotated and incomplete defs), stubtest (check for missing symbols), stubs (partially typed), etc.
typeshed-stats exposes a library interface as well as a CLI. It should be possible to have it as a test dependency here and use a small wrapper script to assert that 100% of parameters have annotations if there's some flag in METADATA.toml. It has 100% test coverage.
API documentation, with code examples, is here: https://alexwaygood.github.io/typeshed-stats/gather/
Closing since there are many merge conflicts and there isn't agreement on the implementation