xpodev / seamless

A Python package for creating and manipulating HTML components. It is working similar to React.js, but in Python.
https://seamless.readthedocs.io
MIT License
11 stars 1 forks source link

Fix typing in empty.py #38

Closed binyamin555 closed 2 months ago

binyamin555 commented 2 months ago

Since typing of **kwargs defines the type that each keyword argument must have, putting dict makes it only allow passing dicts as keyword arguments.

What you actually want is to allow any kind of object to passed as attribute, so this PR fixes this, putting Any as the type of each keyword argument.

BTW, if you want to specify a specific set of keywords without specifying them one by one, use the typing.Unpack type on a typing.TypedDict.

neriyaco commented 2 months ago

I appreciate the PR, can you merge your branch with the current changes I applied to dev/v0.8.1?