Repository navigation
fix: remove deprecated suggestion-mode and guard time_out assignment in preprocessing - #83
Open
sundeep8967 wants to merge 1 commit into
Open
sundeep8967 wants to merge 1 commit into
sundeep8967 wants to merge 1 commit into
Conversation
…in preprocessing Remove the deprecated suggestion-mode option from .pylintrc to avoid unrecognized option errors in modern pylint versions. In src/pyelq/preprocessing.py, initialize time_out to None and rename the inner loop variable to field_name to prevent outer scope shadowing and E0606 possibly-used-before-assignment. Signed-off-by: sundeep8967 <sundeep8967@gmail.com>
sundeep8967
requested review from
bvandekerkhof,
davidrandell84 and
mattj89
as code owners
November 7, 2026 18:40
This branch has not been deployed
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.
Description
This PR resolves a pylint configuration failure and a variable scoping / possible use before assignment warning in
src/pyelq/preprocessing.py:Remove deprecated
suggestion-modefrom.pylintrc:pylintreject the obsoletesuggestion-modeoption withE0015: Unrecognized option found: suggestion-mode (unrecognized-option), causing linter checks to exit with an error.Fix scoping and unassigned variable in
src/pyelq/preprocessing.py:Preprocessor.regularize_data,time_outcould potentially be used before assignment if no field matched or the loop did not execute.time_out = Noneprior to the loop and addedif time_out is not None: sns_new.time = time_outmatching the defensive pattern ininterpolate_single_met_object.fieldtofield_nameto eliminate outer scope shadowing (W0621: Redefining name 'field' from outer scope).Testing
uv run pylint src/pyelq/preprocessing.py(10.00/10 rating)uv run pytest tests/test_preprocessing.py(64/64 passing)uv run black . --checkanduv run isort . --check(passing)