Skip to content

Commit 1e3473a

Browse files
committed
refactor(api)!: n argument in Table.limit and Table.head is now required-positional
1 parent 9c159a7 commit 1e3473a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ibis/expr/types/relations.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,7 +1298,7 @@ def sample(
12981298
self, fraction=fraction, method=method, seed=seed
12991299
).to_expr()
13001300

1301-
def limit(self, n: int | None, *, offset: int = 0) -> Table:
1301+
def limit(self, n: int | None, /, *, offset: int = 0) -> Table:
13021302
"""Select `n` rows from `self` starting at `offset`.
13031303
13041304
::: {.callout-note}
@@ -1361,7 +1361,7 @@ def limit(self, n: int | None, *, offset: int = 0) -> Table:
13611361
"""
13621362
return ops.Limit(self, n, offset).to_expr()
13631363

1364-
def head(self, n: int = 5) -> Table:
1364+
def head(self, n: int = 5, /) -> Table:
13651365
"""Select the first `n` rows of a table.
13661366
13671367
::: {.callout-note}
@@ -1408,7 +1408,7 @@ def head(self, n: int = 5) -> Table:
14081408
[`Table.limit`](#ibis.expr.types.relations.Table.limit)
14091409
[`Table.order_by`](#ibis.expr.types.relations.Table.order_by)
14101410
"""
1411-
return self.limit(n=n)
1411+
return self.limit(n)
14121412

14131413
def order_by(
14141414
self,

0 commit comments

Comments
 (0)