Skip to content

Fix lint issues in qlib/utils/ (W1309, W0612)#2144

Closed
Bortlesboat wants to merge 1 commit intomicrosoft:mainfrom
Bortlesboat:fix-lint-issues
Closed

Fix lint issues in qlib/utils/ (W1309, W0612)#2144
Bortlesboat wants to merge 1 commit intomicrosoft:mainfrom
Bortlesboat:fix-lint-issues

Conversation

@Bortlesboat
Copy link
Copy Markdown

Summary

  • Remove unnecessary f prefix from 16 string literals in qlib/utils/ that contain no interpolated variables (pylint W1309: f-string-without-interpolation)
  • Prefix unused variable lft_etd with underscore in qlib/utils/data.py to indicate it is intentionally unused (pylint W0612: unused-variable)

Contributes to #1007

Details

Files changed:

  • qlib/utils/index_data.py — 7 f-string fixes
  • qlib/utils/objm.py — 7 f-string fixes
  • qlib/utils/mod.py — 1 f-string fix
  • qlib/utils/time.py — 1 f-string fix
  • qlib/utils/data.py — 1 unused variable fix (lft_etd_lft_etd)

All changes are safe cosmetic/lint fixes with no behavioral impact. The existing flake8 and pylint CI checks continue to pass, and the previously-disabled W1309 and W0612 rules now pass cleanly for qlib/utils/.

Test plan

  • Verified flake8 passes with project config (make flake8 equivalent)
  • Verified pylint passes with project config (make pylint equivalent)
  • Verified W1309 (f-string-without-interpolation) reports 0 issues in qlib/utils/
  • Verified W0612 (unused-variable) reports 0 issues in qlib/utils/
  • All changes are purely cosmetic — no logic or behavior changes

🤖 Generated with Claude Code

…ithout interpolation (W1309) and prefix unused variable with underscore (W0612)

Contributes to microsoft#1007

- Remove unnecessary f-string prefix from 16 string literals across
  index_data.py, mod.py, objm.py, and time.py that had no interpolated
  variables (pylint W1309: f-string-without-interpolation)
- Prefix unused variable `lft_etd` with underscore in data.py to
  indicate it is intentionally unused (pylint W0612: unused-variable)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Bortlesboat
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

1 similar comment
@Bortlesboat
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@Bortlesboat
Copy link
Copy Markdown
Author

Closing this — the lint fixes are low-priority and I'd rather focus on the substantive bug fix in #2161. Apologies for the noise.

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