Skip to content

Conversation

@Ayush10
Copy link

@Ayush10 Ayush10 commented Jan 28, 2026

Summary

Fix all instances of R1725 (super-with-arguments) and R1735 (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)

  • Convert super(ClassName, self) to Python 3 style super()
  • Affects 24 files primarily in models, data, and strategy modules
  • This is the recommended Python 3 idiom

R1735: use-dict-literal (127 fixes)

  • Convert dict() to {}
  • Convert dict(key=value) to {"key": value}
  • Affects 57 files across the codebase
  • More Pythonic and slightly faster

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

  • Verified pylint --enable=R1725 qlib now passes (0 errors)
  • Verified pylint --enable=R1735 qlib now passes (0 errors)
  • No functional changes - purely syntactic improvements

Next Steps

After this PR is merged, R1725 and R1735 can be removed from the disabled list in the Makefile.

Partial fix for #1007

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
@Ayush10
Copy link
Author

Ayush10 commented Jan 28, 2026

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant