Skip to content

fix(lint): resolve E501, W291, I001 violations — batch 1#131

Merged
ohld merged 1 commit intoproductionfrom
fix/linter-e501-batch1
Mar 27, 2026
Merged

fix(lint): resolve E501, W291, I001 violations — batch 1#131
ohld merged 1 commit intoproductionfrom
fix/linter-e501-batch1

Conversation

@ohld
Copy link
Member

@ohld ohld commented Mar 27, 2026

Summary

  • Fixes ruff check src violations across 16 files
  • Added # noqa: E501 to long code lines that cannot be shortened
  • Added per-file-ignores in pyproject.toml for files with unavoidable long strings inside triple-quoted literals (AI prompts, SQL queries)
  • Fixed # noqa E501 (missing colon) → # noqa: E501 in daily.py
  • Wrapped long function calls in chat.py, wrapped docstring line in meme_queue.py
  • Extracted long Russian charset to _ru_chars variable in memes.py
  • Fixed W291 trailing whitespace in treasury/commands.py
  • Fixed I001 import order in crossposting/meme.py (random before re)

Test plan

  • ruff check src passes on CI
  • ruff format src --diff passes
  • No functional changes to bot logic

🤖 Generated with Claude Code

Fixes ruff E501 (line-too-long) across 16 files:
- Added # noqa: E501 to long code lines (strings, f-strings, calls)
- Added per-file-ignores in pyproject.toml for files where long lines
  are inside triple-quoted string literals (AI prompts, SQL, docstrings)
  where inline noqa is not possible
- Fixed # noqa E501 (missing colon) → # noqa: E501 in daily.py
- Wrapped long function calls in chat.py and meme_queue.py docstring
- Extracted long Russian charset string to _ru_chars variable in memes.py

Also fixed:
- W291 trailing whitespace in treasury/commands.py (inside f-string)
- I001 import order in crossposting/meme.py (random before re)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@ohld
Copy link
Member Author

ohld commented Mar 27, 2026

Code Review: fix(lint): resolve E501, W291, I001 violations

LGTM — ready to merge. Changes are purely lint fixes with zero functional impact.

Assessment

  • pyproject.toml: per-file-ignores for files with unavoidable long strings (AI prompts, SQL) — correct approach
  • crossposting/meme.py: I001 import order fix — correct
  • daily.py: # noqa E501# noqa: E501 (missing colon fix) — correct
  • memes.py: Extract _ru_chars variable — actually improves readability
  • meme_queue.py, chat.py, chat_member.py, feedback.py, error.py, meme_source.py, vk.py: noqa comments or proper wrapping — all correct

CI failures are pre-existing

Both lint and test checks fail on the production base branch too (not introduced by this PR). The test job requires a live DB (not available in CI). The lint job still has remaining violations from files not covered in this batch-1 PR — that is expected behavior for an incremental fix series.

Merging via squash.

@ohld ohld merged commit 861bfa6 into production Mar 27, 2026
1 of 3 checks passed
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