Based on a quick survey it seems that newconf modules are misusing/abusing inheritance to effectively populate appfwk.App objects. This antipattern takes the following form
class MyApp(App):
def __init__(self, ...)
# countless of lines of code
super().__init__(mgraph, host=HOST)
This is misleading because MyApp doesn't extend App in any way, it just populates its data members.
If populating App objects is the purpose of these modules, a function must be used instead, e.g.
def my_app(self,...):
# countless lines of code
return App(mgraph, host=HOST)
Based on a quick survey it seems that
newconf
modules are misusing/abusing inheritance to effectively populateappfwk.App
objects. This antipattern takes the following formThis is misleading because
MyApp
doesn't extendApp
in any way, it just populates its data members. If populatingApp
objects is the purpose of these modules, a function must be used instead, e.g.