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
With the improved support for typing in atom, I am wondering if it would make to have some special support for the following:
Currently this will work and will statically type check:
fromtypingimportGeneric, TypeVarfromatom.apiimportAtom, ListT=TypeVar("T", bound=object)
classA(Atom, Generic[T]):
# Mypy dislike the use of T outside an annotation # but with #133 we could just use an annotationl: List[T] =List(T) # type: ignoreclassB(A[int]):
passb=B()
b.l.append("") # mypy complain atom is happy though
The fact that atom does not complain at runtime is something I find sad (I work currently in a context where I appreciate the strictest possible typing). I believe we could alter AtomMeta to make it so that the member becomes specialized to also do validation at runtime. Would that be of interest to you @clamdad@frmdstryr ?
One thing I am undecided upon yet if we go this is if A[int] should create a subclass or should only its use in B creation trigger specialization.
The text was updated successfully, but these errors were encountered:
With the improved support for typing in atom, I am wondering if it would make to have some special support for the following:
Currently this will work and will statically type check:
The fact that atom does not complain at runtime is something I find sad (I work currently in a context where I appreciate the strictest possible typing). I believe we could alter AtomMeta to make it so that the member becomes specialized to also do validation at runtime. Would that be of interest to you @clamdad @frmdstryr ?
One thing I am undecided upon yet if we go this is if A[int] should create a subclass or should only its use in B creation trigger specialization.
The text was updated successfully, but these errors were encountered: