Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Chore/fly deploy #30
Chore/fly deploy #30
Changes from all commits
a60ceed
b9619f6
b43f4f2
d456750
a32e7df
85aa3cd
8b2f0bf
ba3640b
643cc94
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (bug_risk): Error handling has been removed from the push_pushover function. Network operations should always include error handling to prevent silent failures.
Consider restoring the try-except block to catch and log potential network errors, ensuring reliable notification delivery tracking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (complexity): Consider restoring the error handling and correcting the docstring in the push_pushover and push_dapnet functions.
The removal of error handling makes the code more fragile and inconsistent with the rest of the codebase. Additionally, the push_pushover() docstring is incorrect. Suggested changes:
These changes:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (typo): The docstring for push_pushover incorrectly describes Discord webhook functionality instead of Pushover notifications.
Suggested implementation:
Note: I've assumed the most common Pushover API parameters (token and user) based on the standard Pushover API usage. If the function signature is different, you may need to adjust the Args section of the docstring to match the actual parameters used in your implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (bug_risk): Error handling has been removed from the push_dapnet function. Network requests should include error handling.
Restore the try-except block to properly handle and log potential network failures when sending DAPNET notifications.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (code-quality): Low code quality found in on_mqtt - 7% (
low-code-quality
)Explanation
The quality score for this function is below the quality threshold of 25%.This score is a combination of the method length, cognitive complexity and working memory.
How can you solve this?
It might be worth refactoring this function to make it shorter and more readable.
their own functions. This is the most important thing you can do - ideally a
function should be less than 10 lines.
sits together within the function rather than being scattered.