mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
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:
committed by
PyTorch MergeBot
parent
6b7970192f
commit
5f18f240de
@ -242,6 +242,7 @@ class Library:
|
||||
|
||||
if dispatch_key == "":
|
||||
dispatch_key = self.dispatch_key
|
||||
# pyrefly: ignore # bad-argument-type
|
||||
assert torch.DispatchKeySet(dispatch_key).has(torch._C.DispatchKey.Dense)
|
||||
|
||||
if isinstance(op_name, str):
|
||||
@ -643,6 +644,7 @@ def impl(
|
||||
>>> y2 = torch.sin(x) + 1
|
||||
>>> assert torch.allclose(y1, y2)
|
||||
"""
|
||||
# pyrefly: ignore # no-matching-overload
|
||||
return _impl(qualname, types, func, lib=lib, disable_dynamo=False)
|
||||
|
||||
|
||||
@ -829,6 +831,7 @@ def register_kernel(
|
||||
if device_types is None:
|
||||
device_types = "CompositeExplicitAutograd"
|
||||
|
||||
# pyrefly: ignore # no-matching-overload
|
||||
return _impl(op, device_types, func, lib=lib, disable_dynamo=True)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user