Closed AvocadoMoon closed 2 weeks ago
Unlike Java which features the CDI, it seems there's no equivalent in python for that. A module can be created that features all of the different global variables wanted, or perhaps there's some other method, but for now it seems not worth the effort.
Global Variable from a Different Python File | Python Dependency Injection
Problem
I need to pass around a variable to every function that requires context to if execution is a test.
Solution
Implement some form of annotation that can be injected to reduce variable book-keeping, and unrelated ties to functions.