From 2e6311956bb2896f95427e32483cddb29abfc8c6 Mon Sep 17 00:00:00 2001 From: wyattscarpenter Date: Tue, 11 Mar 2025 19:16:30 -0400 Subject: [PATCH] Update layers.py: remove a mypy: ignore `mypy: ignore` is not (yet!) actually a feature of the mypy typechecker. However, once I implemented that feature in [my pull-request](https://github.com/python/mypy/pull/17875), it was reported to me that the `type: ignore` you get here is actually unused anyway! (I guess that makes sense, or yous would have noticed the type error it was supposed to be suppressing get raised anyway.) So, it can just be removed. --- sockeye/layers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sockeye/layers.py b/sockeye/layers.py index a9b230075..4664e54b4 100644 --- a/sockeye/layers.py +++ b/sockeye/layers.py @@ -639,7 +639,7 @@ def forward(self, queries: pt.Tensor, key_values: pt.Tensor, mask: Optional[pt.Tensor] = None, - projected_memory_kv: Optional[pt.Tensor] = None) -> pt.Tensor: # mypy: ignore + projected_memory_kv: Optional[pt.Tensor] = None) -> pt.Tensor: """ Computes multi-head attention for queries given a memory tensor. If sequence lengths are provided, they will be used to mask the attention scores.