kalekundert / byoc

MIT License
0 stars 0 forks source link

Provide `main()` function in App subclasses #28

Closed kalekundert closed 2 years ago

kalekundert commented 2 years ago

An app should have a main function. This function should be defined something like so:

class MyApp(appcli.App):
    @classmethod
    def main(cls):
        app = cls.from_params()
        app.do_something()

This problem is what to call the do_something() method. It's basically the main function that the user themselves writes, and so it also wants to be called main(), but I think it makes the most sense to reserve the name main() for the static method that actually can be used as an entry point. So, my options are:

kalekundert commented 2 years ago

Fixed in f7e865a