lablup / lablup/backend.ai

pants check fails on services/processors.py due to re-introduced no-infer-dep comments

Open
#10,778 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
670
Forks
183
Avg merge
17h 7m
Merged PRs (30d)
358

Description

pants check src/ai/backend/manager/services/processors.py fails with 124 [import-not-found] mypy errors on the main branch.

### Root Cause

Commit 019e1551f (fix(BA-4935)) removed all # pants: no-infer-dep comments from TYPE_CHECKING imports in processors.py to fix this exact issue. However, the immediately following commit 2e9e8d95e (feat(BA-4829)) re-introduced # pants: no-infer-dep on all 128 TYPE_CHECKING imports. Subsequent commits (RuntimeVariant, ModelCard, DeploymentRevisionPreset, etc.) continued the same pattern.

### Impact

- pants check on processors.py (and any file that transitively includes it) is broken
- mypy cannot resolve any TYPE_CHECKING imports because pants excludes them from the sandbox

### Fix

Remove all # pants: no-infer-dep comments from TYPE_CHECKING imports in processors.py.

### Side Effects

- No circular dependency risk — dependents are API-layer files; dependencies are service-layer files (no upward imports)
- No runtime impact — imports remain under TYPE_CHECKING guard
- Build performance — processors.py dependency count increases from ~19 to ~100+, widening incremental invalidation scope for its 17 direct dependents. This is the same trade-off accepted in the original BA-4935 fix.

JIRA Issue: BA-5586

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.