Skip to content

Commit 93210e8

Browse files
committed
🐛 typing issue resolution
1 parent eee9453 commit 93210e8

File tree

4 files changed

+14
-16
lines changed

4 files changed

+14
-16
lines changed

lunchable/models/assets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def insert_asset(
233233
payload = _AssetsParamsPost(
234234
type_name=type_name,
235235
subtype_name=subtype_name,
236-
name=name,
236+
name=name, # type: ignore[arg-type]
237237
display_name=display_name,
238238
balance=balance,
239239
balance_as_of=balance_as_of,

lunchable/models/categories.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def get_categories(
175175
response_data = self.make_request(
176176
method=self.Methods.GET,
177177
url_path=APIConfig.LUNCHMONEY_CATEGORIES,
178-
params=_GetCategoriesParams(format=format).model_dump(exclude_none=True),
178+
params=_GetCategoriesParams(format=format).model_dump(exclude_none=True), # type: ignore[arg-type]
179179
)
180180
categories = response_data["categories"]
181181
category_objects = [

lunchable/models/transactions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -534,11 +534,11 @@ def get_transactions(
534534
asset_id=asset_id,
535535
group_id=group_id,
536536
is_group=is_group,
537-
status=status,
537+
status=status, # type: ignore[arg-type]
538538
offset=offset,
539539
limit=limit,
540-
start_date=start_date,
541-
end_date=end_date,
540+
start_date=start_date, # type: ignore[arg-type]
541+
end_date=end_date, # type: ignore[arg-type]
542542
debit_as_negative=debit_as_negative,
543543
pending=pending,
544544
).model_dump(exclude_none=True)

lunchable/plugins/app.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,13 @@ def _lunchable_data_mapping(
150150
Mapping of Lunchable Objects to their Data Collecting Info
151151
"""
152152
return {
153-
PlaidAccountObject: ("plaid_accounts", self.lunch.get_plaid_accounts),
154-
TransactionObject: ("transactions", self.lunch.get_transactions),
155-
CategoriesObject: ("categories", self.lunch.get_categories),
156-
AssetsObject: ("assets", self.lunch.get_assets),
157-
TagsObject: ("tags", self.lunch.get_tags),
153+
PlaidAccountObject: ("plaid_accounts", self.lunch.get_plaid_accounts), # type: ignore[dict-item]
154+
TransactionObject: ("transactions", self.lunch.get_transactions), # type: ignore[dict-item]
155+
CategoriesObject: ("categories", self.lunch.get_categories), # type: ignore[dict-item]
156+
AssetsObject: ("assets", self.lunch.get_assets), # type: ignore[dict-item]
157+
TagsObject: ("tags", self.lunch.get_tags), # type: ignore[dict-item]
158158
UserObject: ("user", self.lunch.get_user),
159-
CryptoObject: ("crypto", self.lunch.get_crypto),
159+
CryptoObject: ("crypto", self.lunch.get_crypto), # type: ignore[dict-item]
160160
}
161161

162162
def __init__(self, access_token: str | None = None):
@@ -184,7 +184,7 @@ def lunchable_models(self) -> List[Type[LunchableModel]]:
184184
"""
185185

186186
@overload
187-
def refresh(self, model: Type[UserObject], **kwargs: Any) -> UserObject:
187+
def refresh(self, model: Type[UserObject], **kwargs: Any) -> UserObject: # type: ignore[overload-overlap]
188188
...
189189

190190
@overload
@@ -193,9 +193,7 @@ def refresh(
193193
) -> Dict[int, LunchableModelType]:
194194
...
195195

196-
def refresh(
197-
self, model: Type[LunchableModel], **kwargs: Any
198-
) -> LunchableModel | Dict[int, LunchableModel]:
196+
def refresh(self, model: Type[LunchableModel], **kwargs: Any) -> Any:
199197
"""
200198
Refresh a Lunchable Model
201199
@@ -235,7 +233,7 @@ def refresh(
235233
if isinstance(fetched_data, UserObject):
236234
data_mapping = fetched_data
237235
else:
238-
data_mapping = {item.id: item for item in fetched_data} # type: ignore[assignment]
236+
data_mapping = {item.id: item for item in fetched_data} # type: ignore[assignment, union-attr]
239237
setattr(self.data, attr_name, data_mapping)
240238
return data_mapping
241239

0 commit comments

Comments
 (0)