merge-pyi creates faulty TypeVars at the top of the file
after running pytype and merge-pyi some files have a line like this at the top of the file
_TXPDoc = TypeVar('_TXPDoc', bound=XPDoc)
Taking this as an example: The class XPDoc is only defined after this line thus when running the script it throws a NameError: name XPDoc isn't defined
This happens to every script that gets this line at the top of the script
putting it in qoutes removes the error and everything works fine...
I am unsure wether I am doing something wrong or it is pytype.
pytype version: 2023.04.18 python version: 3.10.6
I mean putting butting the bound argument in quotes like so bound='XPDoc'
this definitely sounds like a bug in merge-pyi, we ought to add the quotes to prevent this issue.