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
# Return type is a union of tuplesdefparse_resource_id() ->tuple[str, str] |tuple[None, None]:
...
# After destructuring, kind: str | None. The `not in` guard should narrow# it to str, but pyrefly does not narrow via `not in`.deflookup_resource(registry: dict[str, str]) ->str|None:
kind, _obj_id=parse_resource_id()
ifkindnotinregistry:
returnNonereturnregistry[kind] # Pyrefly: str | None not assignable to str key
Mypy, Pyright, and Ty all choose to remain silent on the error.
Describe the Bug
Minimal repro:
Mypy, Pyright, and Ty all choose to remain silent on the error.
Sandbox Link
https://pyrefly.org/sandbox/?project=N4IgZglgNgpgziAXKOBDAdgEwEYHsAeAdAA4CeSIAxAAQBKMALgK4BO61DpxM1Ec1qak3QRc7XGA5NisOAB0sMScVQs4MAPot4uVgGNNETAAoAlNQC0APikyYAbTgMWAGmpOWAXWoAfW7HsAOTEYN2D0GE9EBWpY6kIEhQUaAEEwBhgWakx4ZyY9ZhYIdABzNwBrYsxEd2dfanCYQmoAFQALHgADdFwGXnRO6hKmVUx3Nt0oMfRVFlwAd2TePoZcWtdqbCY%2Bsm0wKFJs3HhqHr6Zljn56gA3CEFu3v7OwgUcyShcXHLpLR19GDGbQlPjOUg1TAQAqOZxuDyeczWdb1RrRdhxSpYNwaXDYABWGiM1AAvNQVGpNNo4LoWAZCSZTEl0bEIJJMdMnsVqMDQSxwTE4oLtIV2I0mULGKx2DyPKR7OzvNQaAAxAAKNQ8KJCpyeqDgcAgJRm2FgHDWmvKMHILhA22gcBI5EQVGoAFUGNAIJxqGBhAVROh5Og3kofbgWABbVAMDToJgR7CZYz4GrFBiImweNESkU%2BuQgQLxxMsGrAfAAX3zChANt2SgOhFWEagFBoqtIewO7gwOAI1D0YkgwxY0YDr3QNAAyjAeG0GAxiHBEAB6Zd1-akQjhkrLmDoZeYXB6ODLgfoIesUdiZdhrKoG6oaCoE08M8XkcesTUXDET%2BB8dkAwEzoBYNyZAaX6kvmADMhAAIwAExVugIDljaqD%2BmByrQDAFBoFgeBEGQqFAA
(Only applicable for extension issues) IDE Information
No response