I pretty frequently find myself using tons of magic strings and flip flopping of environment variables in my scripts.
I have implemented something that does this as best as I can here as an example solution. It's essentially a carbon copy of the EnvManager class but with explicitly defined environments so a static type checker can help you make sure you're feeding correct values and parameters to the GPEnvironment object.
This could also be implemented in a .pyi file for EnvManager.py to allow for forwards compatibility with changes to env parameters and type hinting updates could lag behind without causing issues.
