Open Matt-DESTROYER opened 3 months ago
We could remove them as they are redundant. But I should provide better documentation especially for devs to make things easier.
I would recommend that the Tags
class and all Tag
subclasses be removed since it is bad code design (inaccurate use of inheritance/subclassing).
It does have benefits such as supporting default attributes, improving code intelligence, and making creating certain tags easier, so in the future it can be replaced with a module named tags
with helper functions, which has similar syntax but is much more clean and pythonic:
def link(href: str = '', rel: str = '') -> Tag:
return Tag('link', href=href, rel=rel)
...
All
self.attribute
calls inTags
are now technically redundant, although they could be considered useful as a guide devs to ensure they add the correct/required parameters. Should they be removed or should they stay...?