Describe the Bug
Hi, I'm not sure if this is a false positive or if this is even supposed to be handled by static type checking, but I'm wondering how to handle the following situation:
import torch
from torch import nn
class LeModule(nn.Module):
def __init__(self) -> None:
super().__init__()
self.register_buffer("le_tensor", torch.tensor([0, 1, 2]))
m = LeModule()
if m.le_tensor is not None:
result = m.le_tensor.tolist() # pyrefly: Expected a callable, got Tensor
Sandbox Link
No response
(Only applicable for extension issues) IDE Information
No response
Describe the Bug
Hi, I'm not sure if this is a false positive or if this is even supposed to be handled by static type checking, but I'm wondering how to handle the following situation:
Sandbox Link
No response
(Only applicable for extension issues) IDE Information
No response