Address a few issues in grid_events.py as pointed out by pylint#426
Merged
jonasbardino merged 2 commits intonextfrom Jan 28, 2026
Merged
Address a few issues in grid_events.py as pointed out by pylint#426jonasbardino merged 2 commits intonextfrom
jonasbardino merged 2 commits intonextfrom
Conversation
``` ************* Module mig.server.grid_events mig/server/grid_events.py:275:25: E0606: Possibly using variable 'hit_count' before assignment (possibly-used-before-assignment) mig/server/grid_events.py:275:36: E0606: Possibly using variable 'hit_period' before assignment (possibly-used-before-assignment) ``` and on Rocky9 deployments: ``` ************* Module mig.server.grid_events mig/server/grid_events.py:618:16: E4702: Iterated dict 'all_rules' is being modified inside for loop body, iterate through a copy of it instead. (modified-iterating-dict) mig/server/grid_events.py:624:20: E4702: Iterated dict 'all_rules' is being modified inside for loop body, iterate through a copy of it instead. (modified-iterating-dict) ``` Added a similar fix for the similar in-place `miss_cache` clean up.
…uments to match the API update in watchdog 5.0 and later.
Contributor
|
You beat me both to authoring and review :) great that we are just taking care of these immediately! |
Contributor
Author
Thanks for the quick review @Martin-Rehr and @albu-diku . I'll merge and let the fixes trickle into #338 to silence one more "nagging-generator" from the dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Address a couple of issues in grid_events.py as pointed out by pylint in GH Actions:
also covered in #338, and similarly pylint on Rocky9 deployments:
Added a similar fix for the in-place
miss_cacheclean up as well.The last one about the
PatternMatchingEventHandleronly applies with watchdog 5.x and later:due to an API change in the constructor, and it is fixed with a minor update to our constructor calls.