tetra-framework / tetra

Tetra - A full stack component framework for Django using Alpine.js
https://www.tetraframework.com
MIT License
540 stars 15 forks source link

change BaseComponent.load() signature #24

Closed nerdoc closed 3 months ago

nerdoc commented 1 year ago

https://github.com/samwillis/tetra/blob/3f8fd3586eddd836983ec73ddad5ecfa3707e785/tetra/components/base.py#L162

May I suggest to use

def load(self, *args, **kwargs):

here? When you override this method and add parameters, the signature checker of IDES (here PyCharm) moans that the overridden signature (e.g. def load(self, title)) does not match the parent methods'. grafik

Adding these params adds compatibility to method overrides with more parameters.