method names shadow Python builtins in torch stubs
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 516
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the Bug
I noticed
```
# ==== Dtype Conversion Methods ====
# Note: These method names shadow Python builtins, so type annotations
# after this point should use builtins.int, builtins.bool, builtins.float
```
but after it:
```
`|` is not supported between `(self: Self@Tensor) -> Self@Tensor` and `(self: Self@Tensor) -> Self@Tensor`
Cannot find `__or__` or `__ror__`Pyrefly[unsupported-operation](https://pyrefly.org/en/docs/error-kinds/#unsupported-operation)
(method) float: def float(self: Self@Tensor) -> Self@Tensor: ...
Convert tensor to float32 dtype. Shape-preserving operation.
```
### Sandbox Link
_No response_
### (Only applicable for extension issues) IDE Information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.