Skip to content

Commit

Permalink
Add annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
SF-N committed Mar 22, 2024
1 parent 876e5b0 commit 2c22920
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gt4py/next/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ def __str__(self) -> str:
def __call__(self, val: int) -> NamedIndex:
return NamedIndex(self, val)

def __add__(self, offset: int):
def __add__(self, offset: int) -> ConnectivityField:
from gt4py.next.ffront import fbuiltins

assert isinstance(self.value, str)
return fbuiltins.FieldOffset(f"{self.value}off", source=self, target=(self,))[offset]

def __sub__(self, offset: int):
def __sub__(self, offset: int) -> ConnectivityField:
from gt4py.next.ffront import fbuiltins

assert isinstance(self.value, str)
Expand Down

0 comments on commit 2c22920

Please sign in to comment.