Replace current_app.extensions
-usages and proxies by access wrappers
#454
Labels
current_app.extensions
-usages and proxies by access wrappers
#454
Rationale
Instead of using
LocalProxy
s ourselves, we should just store the relevant objects ing
and access that.This would make the code easier to read and more in line with flask tutorials.
To make this well-typed, we could add a „type shim“ for
g
, which knows about the stored attributes, and import that.Usages
sipa/sipa/backends/extension.py
Lines 340 to 341 in 004bb6a
sipa/sipa/blueprints/register.py
Line 22 in 004bb6a
sipa/sipa/model/sample/user.py
Line 38 in 004bb6a
sipa/sipa/model/pycroft/user.py
Line 25 in 004bb6a
sipa/sipa/model/pycroft/userdb.py
Line 47 in 004bb6a
The text was updated successfully, but these errors were encountered: