Add initial suppressions for pyrefly (#164177)

Adds suppressions to pyrefly will typecheck clean: https://github.com/pytorch/pytorch/issues/163283

Test plan:
`python3 scripts/lintrunner.py`
`pyrefly check`

---

Pyrefly check before: https://gist.github.com/maggiemoss/3a0aa0b6cdda0e449cd5743d5fce2c60
After:

```
 INFO Checking project configured at `/Users/maggiemoss/python_projects/pytorch/pyrefly.toml`
 INFO 0 errors (1,063 ignored)
```

Pull Request resolved: https://github.com/pytorch/pytorch/pull/164177
Approved by: https://github.com/Lucaskabela
This commit is contained in:
Maggie Moss
2025-10-02 20:57:37 +00:00
committed by PyTorch MergeBot
parent 6b7970192f
commit 5f18f240de
38 changed files with 170 additions and 75 deletions

View File

@ -421,7 +421,7 @@ def set_dir(d: Union[str, os.PathLike]) -> None:
d (str): path to a local folder to save downloaded models & weights.
"""
global _hub_dir
_hub_dir = os.path.expanduser(d)
_hub_dir = os.path.expanduser(d) # pyrefly: ignore # no-matching-overload
def list(