-
Notifications
You must be signed in to change notification settings - Fork 280
Labels
typecheckingusabilityUsability & readiness issues identified with running Pyrefly on top OSS projectsUsability & readiness issues identified with running Pyrefly on top OSS projects
Description
Describe the Bug
Minimal repro:
from string import ascii_uppercase
letter_to_index = {char: i for i, char in enumerate(ascii_uppercase)}
def encode(message: str) -> list[int]:
result = []
for letter in message:
result.append(letter_to_index[letter]) # FP: str not assignable to LiteralString
return resultNo other type checker infers letter_to_index as keyed on LiteralString.
Sandbox Link
(Only applicable for extension issues) IDE Information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
typecheckingusabilityUsability & readiness issues identified with running Pyrefly on top OSS projectsUsability & readiness issues identified with running Pyrefly on top OSS projects