← Back to issue list

perf: add TC001/2/3 linter rules to check imports

View original Github issue

Metadata

Project
craft-application
Number
#797
Type
pull request
State
merged
Author
upils
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #797 in commit 5a49fd57, enabling TC001–TC003 import checks and correcting violations across 29 files for more precise import handling.

Resolution: closed resolved

Reason: The approved pull request was merged as commit 5a49fd57, adding the three lint rules and fixing the detected import issues.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [ ] Have you followed the guidelines for contributing? - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `make lint && make test`? - [ ] Have you added an entry to the changelog (`docs/reference/changelog.rst`)? --- Add TC001/2/3 linter rules to check imports and fixes errors found by these rules. No improvement to import time were specifically measured for this change but the goal is to gradually move to a more precise imports handling.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #797 in commit 5a49fd57, enabling TC001–TC003 import checks and correcting violations across 29 files for more precise import handling.
stealth/space-bunny-alpha — closed resolved Merged in canonical/craft-application#797 via commit 5a49fd57, adding TC001–TC003 import checks and fixing violations in 29 files.
qwen/qwen3.6-35b-a3b — — Merged after approval. Introduces TC001/2/3 linter rules to validate imports and resolves associated errors across 29 files. Core CI checks passed. Implements gradual improvements to import handling precision.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#415 style: add TC001, TC002 and TC003 rules starbase merged Merged PR #415 as commit 3cc0e96, adding Ruff TC001, TC002, and TC003 rules to pyproject.toml; all CI checks passed.
71%
#1151 perf: Conditional imports for dependencies only used for type checks craft-parts merged Merged #1151 (commit 2776050f) by maintainer upils: added 3 lint rules flagging imports used only for type checks and wrapped selected dependency imports in deferred type-checking blocks. Approved by 3 reviewers; all CI checks passed.
70%