Jonathan Plasse
Jonathan Plasse
I have to check, but I think it should be possible to use [descriptors](https://docs.python.org/3/reference/datamodel.html#descriptors) to absorb the change in `mathutils.Vector`.
Here is the version using descriptor. This absorbs the change in `mathutils.Vector`. The only inconvenient is that when assigning a tuple to `Vector`, any size of float tuple is accepted,...
Using `Iterable[float]` should work. > That looks like a promising solution! 😄 > > I wonder if it would be worth defining a [Protocol](https://typing.readthedocs.io/en/latest/spec/protocol.html) for Vector-like input? `o.location = range(3)`...
I will try implementing this.
`Sequence[float]` then. > > Using `Iterable[float]` should work. > > Ah, but `(n for n in range(3))` is an `Iterable` that should not type check okay—`__len__` is required. 😉
So a protocol with `__len__` and `__getitem__` should be enough. This protocol would only be used as allowed type when setting a property.
I would like to work on it.
Currently, the generated code is not linted by Pylint. Why should the pyi files pass Pylint? Typeshed only use black and flake8-pyi to lint and format pyi files. In my...
Should I go ahead adding Ruff?
> @JonathanPlasse > > I think Ruff does not all formatting rules of Pylint and Pycodestyle. To support Pylint and Pycodestyle users, lint test with multiple linter tool is prefer....