You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VSCode type checking stops checking for valid args when I call the function, and autocomplete breaks for the args. The function is just interpreted as an Op object. See eg the hover
This is a showstopper, as I rely heavily on autocomplete and type checking. Notice how I forgot to add an arg
The text was updated successfully, but these errors were encountered:
fromcollections.abcimportCallablefromtypingimportTypeVar, castimportweaveC=TypeVar("C", bound=Callable)
defweave_op():
defret(fn: C) ->C:
returncast(C, weave.op()(fn))
returnret
Which I then use like:
@weave_op()defmy_func(foo: str) ->str:
...
I don't support any of the @weave.op() arguments, and I don't expose any typing information about what I can use on an Op, but it's good enough for me for now. I think the correct thing would be to make the Op class have a generic type argument
If I have the following code:
VSCode type checking stops checking for valid args when I call the function, and autocomplete breaks for the args. The function is just interpreted as an
Op
object. See eg the hoverThis is a showstopper, as I rely heavily on autocomplete and type checking. Notice how I forgot to add an arg
The text was updated successfully, but these errors were encountered: