typeshed
typeshed copied to clipboard
Who is the tool: the programmer or the program?
I'm using typeshed_client to get the typeshed ast stub file, then I'm doing ast things to the file, and I am writing extra code to accommodate these three things
https://github.com/python/typeshed/blob/ecd5141cc036366cc9e3ca371096d6a14b0ccd13/stdlib/ast.pyi#L1495-L1498
https://github.com/python/typeshed/blob/ecd5141cc036366cc9e3ca371096d6a14b0ccd13/stdlib/ast.pyi#L1196-L1199
which made me wonder: ought we disfigure a universal tool (Python's official stub file) because of a third-party validator's error?
Does the code validator serve the code writer, or do we write code to appease the code validator?
I believe a uniform, predictable stub file is better than coding around a false diagnostic report. I propose removing the three TypeAlias.