diff --git a/narwhals/_arrow/dataframe.py b/narwhals/_arrow/dataframe.py index 6f8cd0990..428e83e3b 100644 --- a/narwhals/_arrow/dataframe.py +++ b/narwhals/_arrow/dataframe.py @@ -183,9 +183,9 @@ def __getitem__( # PyArrow columns are always strings col_name = item[1] if isinstance(item[1], str) else self.columns[item[1]] - if isinstance(item[0], str): - msg = "Can not slice with tuple with the first element as a str" # pragma: no cover - raise TypeError(msg) # pragma: no cover + if isinstance(item[0], str): # pragma: no cover + msg = "Can not slice with tuple with the first element as a str" + raise TypeError(msg) if (isinstance(item[0], slice)) and (item[0] == slice(None)): return ArrowSeries( self._native_frame[col_name],