fix: Resolve R1725 and R1735 pylint errors#2103
Open
Ayush10 wants to merge 1 commit intomicrosoft:mainfrom
Open
fix: Resolve R1725 and R1735 pylint errors#2103Ayush10 wants to merge 1 commit intomicrosoft:mainfrom
Ayush10 wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Fix all instances of R1725 (super-with-arguments) and R1735
(use-dict-literal) pylint errors across the codebase.
R1725 fixes (100 occurrences):
- Convert `super(ClassName, self)` to Python 3 style `super()`
- Affects 24 files primarily in models, data, and strategy modules
R1735 fixes (127 occurrences):
- Convert `dict()` to `{}`
- Convert `dict(key=value)` to `{"key": value}`
- Affects 57 files across the codebase
This enables both R1725 and R1735 rules to be removed from the
disabled list in the Makefile.
Partial fix for microsoft#1007
Author
|
@microsoft-github-policy-service agree |
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
Fix all instances of
R1725(super-with-arguments) andR1735(use-dict-literal) pylint errors across the codebase.This is a partial fix for #1007 - focusing on two well-defined, mechanical pylint rules.
Changes
R1725: super-with-arguments (100 fixes)
super(ClassName, self)to Python 3 stylesuper()R1735: use-dict-literal (127 fixes)
dict()to{}dict(key=value)to{"key": value}Files Modified
67 files changed across:
qlib/backtest/qlib/contrib/model/qlib/contrib/report/qlib/contrib/rolling/qlib/contrib/strategy/qlib/data/qlib/rl/qlib/workflow/Test Plan
pylint --enable=R1725 qlibnow passes (0 errors)pylint --enable=R1735 qlibnow passes (0 errors)Next Steps
After this PR is merged,
R1725andR1735can be removed from the disabled list in the Makefile.Partial fix for #1007