bug: false positive for `implicit-any`
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 519
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the Bug
I encountered a case where pyrefly v0.49.0 and above falsely detects `implicit-any`, when that rule is enabled.
```py
# This is an explicit any, so the warning is false
def test1() -> Any:
return {} # also happens with []
```
Update: Removed the second example as it was part of #2227 and fixed in 0.61.1. Both are still in the sandbox link though.
### Sandbox Link
https://pyrefly.org/sandbox/?project=N4IgZglgNgpgziAXKOBDAdgEwEYHsAeAdAA4CeS4ATrgLYAEALqcROgOZ0Q3G6UN0BBdKQA6WGGEbwGARgAUASjoBaAHyDhiMXR11KMBgFdK6OsAC%2BYq%2BgDEjABYQ4dOPdyGomOsWrZU2KFI6bBg6VDpMCDAwGH10fljqSgAaOjBeRkpSVg4GXBcDCNQGVABtERAAaxhREABdcpBUCrq6AHcIBjdDfgBjexheypyiksbq2taYfCcGOAB%2BMUwJKTgGACZURRV1ADlcdBgtU11MYtRECIhehlK1lKubu4YHoVI61oBeMwqJisuLJYTjozmNfjUWo1mvU6N8ZNYxHZUJhIuwHE46L0DpEGBADnoYDRcAA3eAOUJtVAmHJLFYMaTrbDbNR0faHY66UYXR63e6pSJPPkad5fH5VCFIMzmIGcqJ0cG1TimUEXbSc07ncYShoVaGi%2BHoEDJEBkfRgQKEPI0KAUOwABVIZsCLgwOAImIOkDYxmKePQhERdAAyjBQvYGAxiHBEAB6GOmiQW3hsGMwdAxzC4XpwGNY9Ben24g4xtIZVDE1DQfywD35iDeyi%2B-G4YhF9BwAPoMhdA7KUmUOB%2B2HykAAZkIMnWFWspUSvDgdTEXGIUGunWUGCC3wqc8oFRA5mNqBuEFJADFoDAKGgsHgiGQD0A
### (Only applicable for extension issues) IDE Information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.