Summary
Python PEP 695 aliases and TypeAlias/NewType/TypeVar family declarations are persisted as import symbols.
v1.38.0 evidence / reproduction / control flow
SymbolExtractor.cs:897-900 maps type UserId = int, TypeAlias, NewType, TypeVar, ParamSpec, and TypeVarTuple matches to new("import", ...) even though they define names rather than import them.
Impact
Outline semantics are wrong and import filters, unused analysis, and dependency classification can treat local type definitions as imports.
Suggested direction / acceptance criteria
- Introduce additive
typealias and type_parameter (or equivalent catalog-approved) kinds.
- Provide a compatibility/family mapping for older clients.
- Update extraction, schema/catalog validation, output documentation, and fixtures together.
- Assert these declarations no longer appear in import-only queries.
Dogfooding candidate IDs: E021.
Observed with locally built cdidx v1.38.0 from origin/main on 2026-07-15.
Summary
Python PEP 695 aliases and
TypeAlias/NewType/TypeVarfamily declarations are persisted asimportsymbols.v1.38.0 evidence / reproduction / control flow
SymbolExtractor.cs:897-900mapstype UserId = int,TypeAlias,NewType,TypeVar,ParamSpec, andTypeVarTuplematches tonew("import", ...)even though they define names rather than import them.Impact
Outline semantics are wrong and import filters, unused analysis, and dependency classification can treat local type definitions as imports.
Suggested direction / acceptance criteria
typealiasandtype_parameter(or equivalent catalog-approved) kinds.Dogfooding candidate IDs: E021.
Observed with locally built cdidx v1.38.0 from origin/main on 2026-07-15.