Skip to content

Commit

Permalink
Fix keyword-only parameter notation
Browse files Browse the repository at this point in the history
  • Loading branch information
mesozoic committed Apr 29, 2024
1 parent 8321483 commit 193a533
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pyairtable/orm/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ def _repr_fields(self) -> List[Tuple[str, Any]]:
def populate(
self,
instance: "Model",
/,
*,
lazy: Optional[bool] = None,
memoize: Optional[bool] = None,
) -> None:
Expand Down Expand Up @@ -832,7 +832,7 @@ def to_record_value(self, value: List[Union[str, T_Linked]]) -> List[str]:
def populate(
self,
instance: "Model",
/,
*,
lazy: Optional[bool] = None,
memoize: Optional[bool] = None,
) -> None:
Expand Down
14 changes: 9 additions & 5 deletions pyairtable/orm/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def delete(self) -> bool:
return bool(result["deleted"])

@classmethod
def all(cls, /, memoize: Optional[bool] = None, **kwargs: Any) -> List[SelfType]:
def all(cls, *, memoize: Optional[bool] = None, **kwargs: Any) -> List[SelfType]:
"""
Retrieve all records for this model. For all supported
keyword arguments, see :meth:`Table.all <pyairtable.Table.all>`.
Expand All @@ -279,7 +279,7 @@ def all(cls, /, memoize: Optional[bool] = None, **kwargs: Any) -> List[SelfType]

@classmethod
def first(
cls, /, memoize: Optional[bool] = None, **kwargs: Any
cls, *, memoize: Optional[bool] = None, **kwargs: Any
) -> Optional[SelfType]:
"""
Retrieve the first record for this model. For all supported
Expand Down Expand Up @@ -316,7 +316,7 @@ def to_record(self, only_writable: bool = False) -> RecordDict:

@classmethod
def from_record(
cls, record: RecordDict, /, memoize: Optional[bool] = None
cls, record: RecordDict, *, memoize: Optional[bool] = None
) -> SelfType:
"""
Create an instance from a record dict.
Expand Down Expand Up @@ -351,7 +351,11 @@ def from_record(

@classmethod
def from_id(
cls, record_id: RecordId, /, fetch: bool = True, memoize: Optional[bool] = None
cls,
record_id: RecordId,
*,
fetch: bool = True,
memoize: Optional[bool] = None,
) -> SelfType:
"""
Create an instance from a record ID.
Expand Down Expand Up @@ -389,7 +393,7 @@ def fetch(self) -> None:
def from_ids(
cls,
record_ids: Iterable[RecordId],
/,
*,
fetch: bool = True,
memoize: Optional[bool] = None,
) -> List[SelfType]:
Expand Down

0 comments on commit 193a533

Please sign in to comment.