Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Logic Improvement] Enable notifications for the first iteration of the scanner when the state is empty #548

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

Conversation

ThomasDelsart
Copy link
Contributor

In this first iteration of the scanner, the self.state variable is initialized as an empty dictionary and only populated after the first notification command is executed. This means that in the initial scan, notifications are not sent for magic bags already available in the TGTG application.

Since the second scan does not detect changes (if no new magic bags are added), no notifications are sent for the already available magic bags.

To address this, I propose a minor logic improvement by initializing the self.state variable before the first notification command is triggered.

Additionally, to pass the pre-commit checks, I ran poetry lock to update dependencies, as poetry lock --no-update was unsuccessful. The app continues to run smoothly with these changes.

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

Successfully merging this pull request may close these issues.

1 participant