Fix linter problems #317
Labels
No labels
Closed As
Duplicate
Closed As
Fixed
Closed As
Invalid
discussions
easyfix
enhancement
task
ai-review-please
Backlog Status
Needs Review
Backlog Status
Ready
chore
documentation
points
01
points
02
points
03
points
05
points
08
points
13
pr2jira
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Sprint Status
Blocked
Sprint Status
Done
Sprint Status
In Progress
Sprint Status
Review
Sprint Status
To Do
Technical Debt
Work Item
Bug
Work Item
Epic
Work Item
Spike
Work Item
Task
Work Item
User Story
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Blocks
#306 Reformat codebase to satisfy CI linter check
quality/blockerbugs
#315 Make ci.yml use devel commands for linting and testing
quality/blockerbugs
Reference
quality/blockerbugs!317
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/306-3-ruff-linting"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Assisted-by: Claude Code
WIP: Fix linter problemsto Fix linter problemsAI Code Review
📋 MR Summary
This merge request resolves various ruff and mypy linting warnings, fixes types and unused dependencies, and simplifies the CI workflow.
mockwithunittest.mockacross tests.type: ignorecomments to satisfymypy.requirements.txtandrequirements-development.txt.Detailed Code Review
Overall, these are excellent housekeeping changes. Replacing
mockwith the standard libraryunittest.mockreduces external dependencies and aligns with modern Python practices. The typing additions make the codebase more robust and readable.The only minor point is regarding the CI pipeline modifications. By placing the linting steps after the testing step in the same job, linting feedback will be delayed until the tests finish. If the tests fail, the linters will not run at all. Moving linting to run before tests or in a parallel job would ensure faster feedback on code style issues.
📂 File Reviews
📄 `.forgejo/workflows/ci.yml` - Consolidated linting and testing into sequential steps within the same job.
ruffandmypysteps to run before theRun testsstep.✅ Summary
🤖 AI Code Review | Generated with ai-code-review | Model:
gemini-3.1-pro-preview⚠️ AI-generated suggestions may be incorrect. Verify before applying. Not a replacement for human review.
Ready for review, I guess
kparal referenced this pull request2026-06-15 10:17:32 +00:00
7aae7202ffe5c13b8250320b5219963fbc4de037I reworked the existing changes into 3 separate commits, and it's OK to be merged, as far as I'm concerned.
@jgroman WDYT?
@ -59,3 +59,1 @@needs: teststeps:- name: Evaluate lint results./run testSo I wanted to fix #315 with this, but I forgot that this doesn't likely run python3.11, right? I'll need to fix that or go back to the original invocation.
I was wrong. It's already running in a venv using Python 3.11, so it's using Python 3.11 for pytest as well.
Should be fine now, please review as well
Cannot add myself to reviewers group but LGTM. ✅