fix(lint): resolve 854 pylint errors across 7 disabled rules#2104
Open
Ayush10 wants to merge 2 commits intomicrosoft:mainfrom
Open
fix(lint): resolve 854 pylint errors across 7 disabled rules#2104Ayush10 wants to merge 2 commits intomicrosoft:mainfrom
Ayush10 wants to merge 2 commits intomicrosoft:mainfrom
Conversation
added 2 commits
January 30, 2026 23:27
…ft#1007) Fix all violations for the following pylint rules so they can be re-enabled in CI: - W0621 (redefined-outer-name): 6 fixes - rename variables that shadow outer scope names - W0622 (redefined-builtin): 15 fixes - rename parameters that shadow Python builtins (id, type, format, input, hash, vars, object) - R1705 (no-else-return): 139 fixes - remove unnecessary else/elif after return/raise/break/continue - W0102 (dangerous-default-value): 152 fixes - replace mutable default arguments with None + guard pattern - W0612 (unused-variable): 80 fixes - prefix unused variables with underscore or remove unused assignments - R0402 (consider-using-from-import): 56 fixes - convert "import X.Y as Y" to "from X import Y" - C0209 (consider-using-f-string): 406 fixes - convert .format() and % string formatting to f-strings
Add missing super().__init__() calls in 41 files across all subclasses that were missing parent initialization: - Model/ModelFT subclasses (32 pytorch model files + catboost, xgboost, linear, double_ensemble, gbdt, highfreq_gdbt) - Processor subclasses (10 classes in dataset/processor.py + 2 in highfreq_processor.py) - ElemOperator subclasses (ops.py, high_freq.py) with super().__init__(feature) - Serializable subclasses (collect.py, loader.py, manager.py) - SingleMetric subclass (high_performance_ds.py) - BaseModel subclass (riskmodel/base.py)
5417148 to
40957e4
Compare
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.
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