make code more pythonic
Closed this issue ยท 7 comments
-
settings.py
-
impfbot.py
-
alerts.py
-
api_wrapper.py
-
common.py
-
config_generator.py
could also use some improvements
For settings.py
:
Since everything is checked now (as of 9310053) all of the code after config generation is obsolete and only needs to be run when a config.ini is provided by the user (and not generated). We could move it to a separate function then.
Also, I'd suggest using one const NOTIFIERS
used by config_generator.py
, settings.py
, alerts.py
and wherever else it might be needed. This way, we could reduce lines of code in several places.
Also, I'd suggest using one const
NOTIFIERS
used byconfig_generator.py
,settings.py
,alerts.py
and wherever else it might be needed. This way, we could reduce lines of code in several places.
i've over engineered settings.py
in make-code-more-pythonic for v3.0.0 making use of NOTIFIERS
. alerts.py
is in queue.
Looks great!
That's a lot of changes though, we'll have to make sure everything works as expected.
I've written tests this time to be safe ๐
(tests for settings.py
still missing). Still, i'll test everything manually before the release to be on the safe side.
5/5 yay