I've currently got a Project in PyCharm that uses a virtualenv fully setup properly. That is, running everything works just fine and there's no issues. But this specific development environment uses some globally injected variables without needing to be imported. This works fine for runtime, but it causes these globals to be red-underlined as they're never imported or defined.
There exists a bit of a workaround, which is a file that just defines these variables for the type checker (it looks something like this):
global_var: "Type" = ...
If you import everything from the above file, any red squiggles will disappear. However, this is annoying to do in every file and feels like it should be unnecessary.
Thus, my question is: is it possible to "trick" PyCharm (or the python interpreter it is using) to pretend as if this file were included in every file it is interpreting?
I've looked through lots of options on PyCharm and the interpreter and it doesn't really seem like anything is jumping out. I'm hoping that there's some kind of workaround or hacky solution that would work for this as a result.