mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
typing: allow integer in bitwise operations (#155704)
Fixes #155701 (false positives) Pull Request resolved: https://github.com/pytorch/pytorch/pull/155704 Approved by: https://github.com/Skylion007, https://github.com/aorenste
This commit is contained in:
committed by
PyTorch MergeBot
parent
938515fa75
commit
f04fd4dc4e
@ -261,7 +261,7 @@ def sig_for_ops(opname: str) -> list[str]:
|
||||
]
|
||||
return [f"def {opname}(self, other: Tensor | Number | _complex) -> Tensor: ..."]
|
||||
elif name in logic_ops:
|
||||
return [f"def {opname}(self, other: Tensor | _bool) -> Tensor: ..."]
|
||||
return [f"def {opname}(self, other: Tensor | _int) -> Tensor: ..."]
|
||||
elif name in shift_ops:
|
||||
return [f"def {opname}(self, other: Tensor | _int) -> Tensor: ..."]
|
||||
elif name in symmetric_comparison_ops:
|
||||
|
Reference in New Issue
Block a user