Skip to content

Fix type/type-min CI: suppress argcomplete unresolved-import#3729

Closed
worksbyfriday wants to merge 1 commit intotox-dev:mainfrom
worksbyfriday:fix-type-argcomplete-import
Closed

Fix type/type-min CI: suppress argcomplete unresolved-import#3729
worksbyfriday wants to merge 1 commit intotox-dev:mainfrom
worksbyfriday:fix-type-argcomplete-import

Conversation

@worksbyfriday
Copy link
Contributor

Summary

The type and type-min CI jobs fail because ty check cannot resolve the argcomplete import:

src/tox/config/cli/parse.py:74:16: error[unresolved-import] Cannot resolve imported module `argcomplete`
tests/config/cli/test_argcomplete.py:5:8: error[unresolved-import] Cannot resolve imported module `argcomplete`

argcomplete is an optional dependency under extras=["completion"] and may not be installed in the type check environment. The import in parse.py is already guarded with try/except ImportError, and the test file only runs when argcomplete is available.

Changes

Added # ty: ignore[unresolved-import] comments to both import sites, matching the existing pattern used for other optional/platform-specific imports (e.g., _overlapped, pty, termios in local_sub_process/__init__.py).

Test plan

  • Verify type/type-min CI jobs pass (they currently fail on main with the same error)

…mport

argcomplete is an optional dependency (extras=["completion"]) that may not
be installed in the type check environment. ty flags the import as
unresolved-import, causing type/type-min CI jobs to fail.

The import in parse.py is already guarded with try/except ImportError, and
the test file only runs when argcomplete is installed. Adding ty: ignore
comments aligns with the existing pattern used for other optional imports
(e.g., _overlapped, pty, termios in local_sub_process).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

2 participants