nunobrum / PyLTSpice

Set of tools to interact with LTSpice. See README file for more information.
https://www.nunobrum.com/pyltspice.html
GNU General Public License v3.0
207 stars 59 forks source link

Fix PyLance typing error #100

Closed gudnimg closed 1 year ago

gudnimg commented 1 year ago

Using ... means there can be any number of items in the tuple, but the type is known (string)

image

See https://docs.python.org/3/library/typing.html#typing.Tuple

To specify a variable-length tuple of homogeneous type, use literal ellipsis, e.g. Tuple[int, ...]. A plain Tuple is equivalent to Tuple[Any, ...], and in turn to tuple.

nunobrum commented 1 year ago

Maybe the List needs to be fixed as well. Moving forward, I'll start using the union type notation | instead of Union[ ]