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
I don't think this is possible with pythons type system. Where there are cases of unions being passed into _convert_type removing the Any will fail as UnionType is not a type. We can remove the type and just have it as:
If we want to clean it up a bit and be explicit about what we are doing (as the Any just flags to disregard any types anyway). Otherwise we can just ignore it.
The first line of the method is if typ is NoneType so it can't just be type. I remember unions being a pain so so if we're dealing with the Any case anyway, leaving it just as Any makes sense.
Activity
stan-dot commentedon Sep 9, 2024
@callumforrester have we moved away from mypy to pyright enough that we can remove
| Anywithout waiting for that mypy issue?At the moment it does seem that we use mypy in the project
callumforrester commentedon Sep 11, 2024
Pending #619
abbiemery commentedon Feb 27, 2026
I don't think this is possible with pythons type system. Where there are cases of unions being passed into
_convert_typeremoving theAnywill fail asUnionTypeis not atype. We can remove thetypeand just have it as:If we want to clean it up a bit and be explicit about what we are doing (as the
Anyjust flags to disregard any types anyway). Otherwise we can just ignore it.(@tpoliaw for a sanity check?)
tpoliaw commentedon Mar 3, 2026
The first line of the method is
if typ is NoneTypeso it can't just betype. I remember unions being a pain so so if we're dealing with theAnycase anyway, leaving it just asAnymakes sense.chore: Remove redundant type (#1421)