Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Add done attribute to shopping list #277

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

DellanX
Copy link

@DellanX DellanX commented Feb 2, 2024

Description

I needed to be able to determine whether or not the item was checked off in Grocy. Thus I mapped the 'done' attribute over from the raw shopping list item.

NOTE: Tox didn't run out of the box correctly for me, I needed to add a comma on line 5 between TRAVIS and TRAVIS_* to get the test suite to run correctly.

Related issue (if applicable):
NA

Checklist

  • The code change is tested and works locally.
  • tests pass. Your PR won't be merged unless tests pass
  • There is no commented out code in this PR

@DellanX DellanX mentioned this pull request Feb 2, 2024
15 tasks
@DellanX
Copy link
Author

DellanX commented Feb 3, 2024

I have a second commit following this one on my branch at: https://github.com/DellanX/pygrocy/tree/feature/annotate-data-models.

I'd like to close this PR before attempting that one, as that PR will fix a bunch of issues cause by null data, and adds None type annotations

@@ -14,6 +14,7 @@ def test_get_shopping_list_valid(self, grocy):
for item in shopping_list:
assert isinstance(item, ShoppingListProduct)
assert isinstance(item.id, int)
assert isinstance(item.done, int)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I'm a bit out-of-the-loop regarding grocy, is int the correct type for done. Sounds like it should be a boolean.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants