fix(lint): resolve 854 pylint errors across 7 disabled rules #2104
+4,133
−4,591
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.
Summary
Fixes #1007 (partial) — resolves 854 pylint violations across 7 disabled rules in 126 files, enabling these rules to be re-enabled in CI:
redefined-outer-nameredefined-builtinno-else-returndangerous-default-valueunused-variableconsider-using-from-importconsider-using-f-stringKey changes
id→idx,type→resource_type,input→input_data, etc.)else/elifafterreturn/raise/break/continuestatements[],{},defaultdict(float)) withNone+ guard pattern_) or removed unused assignmentsimport torch.nn as nnstyle tofrom torch import nn.format()calls and%string formatting to f-stringsAll changes are mechanical/style-only with no behavioral changes. Verified with
pylint --enable=<rule> qlibshowing 0 errors for each rule.Test plan
pylint --disable=all --enable=W0621,W0622,R1705,W0102,W0612,R0402,C0209 qlibreports 0 errors