Road-hog123
Road-hog123
I also experienced this issue just now - just at the point of loading into an engagement. In case it matters I was playing the NATO 1984 campaign with a...
Can I suggest [PEP 673](https://peps.python.org/pep-0673/)'s `Self` type as a related change? Presently `ID.evaluated_get()` returns `ID`, but if this were changed to `Self` then I believe `Object.evaluated_get()` would correctly return `Object`...
> `Mesh.uv_layers` is a `bpy_prop_collection[MeshUVLoopLayer]`, so retrieving an element by name with `.get()` should return either a `MeshUVLoopLayer` **or the type of the `default` parameter**. As per [my comment](https://github.com/nutti/fake-bpy-module/issues/153#issuecomment-2118664336) in...
My initial thoughts are: `foreach_get(attr: str, seq: MutableSequence) -> None` `foreach_set(attr: str, seq: Sequence[bool | int | float]) -> None` These are very C-like methods, with `foreach_get()` trying to avoid...
`typing.MutableSequence` and `collections.abc.ByteString` are deprecated, but `collections.abc.MutableSequence` shouldn't be?
> `collections.abc.MutableSequence[bool] | collections.abc.MutableSequence[int] | collections.abc.MutableSequence[float]` and `collections.abc.MutableSequence[bool | int | float]` will be an error. What is the error? I don't see why either of these would be incorrect...
I think the input type should be `mathutils.Vector | typing.Sequence[float]`—perhaps this could be defined as a type alias, thereby giving it a nice clean name? `object.location = range(1, 4)` presently...
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)` and `o.location = np.array((0, 4, 5))` should...
> 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. 😉
> `Sequence[float]` then. Ah, but `np.array` is not a `Sequence` 😢 Perhaps I will dive into the source code and work out exactly what methods are required—`__len__` and `__getitem__` for...