Skip to content

Type hints of __init__ in StaticItem are not correct #109

@benoit74

Description

@benoit74

The __init__ function of StaticItem is inherited from Item.

The type hint is incorrect in Item because it miss at least the callback attribute.

The type hint is even more incorrect in StaticItem because it misses all additional attributes from this class.

In addition to these two issues, I have a newbie question. Can't we write the __init__ in a less generic way, i.e. with all attributes specified instead of **kwargs ? I imagine this would imply more maintenance every time libzim is modified, but at the same time would help a lot to discover all possible attributes + have correct type hints for every of them. But I might probably miss something else.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions