app is both used as a global and local variable.
This didn't overwrite anything, as app were an empty structure at this point.
Detected using pylint:
Ysul (Python general3 env)
$ pylint notifications [...] W:134, 4: Redefining name 'app' from outer scope (line 180) (redefined-outer-name) [...]