Visitar URL original
fix: Fix mypy TorchTensor type alias error by nithin42 · Pull Request #6712 · feast-dev/feast · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: remove redundant import torch under TYPE_CHECKING block
The bare `import torch` statement inside the `if TYPE_CHECKING:` branch
was superseded by `from torch import Tensor as TorchTensor` on the
following line. Since `TorchTensor` is the only torch symbol referenced
in type annotations, the standalone module import is unnecessary and
can be dropped without affecting runtime or static-analysis behaviour.

Addresses nitpick raised in code review.

Signed-off-by: Nithin <kumbam.nithingoud@gmail.com>
  • Loading branch information
nithin42 committed Aug 10, 2026
commit a0c040ffa6468eb0af600ef416e768a355875183
1 change: 0 additions & 1 deletion sdk/python/feast/online_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from feast.value_type import ValueType

if TYPE_CHECKING:
import torch
from torch import Tensor as TorchTensor
else:
TorchTensor = Any
Expand Down
Loading