KotlinIsland / KotlinIsland/basedmypy

sort out variadic and unknown/projected `*Ts`s and `**P`s

Open
#855 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
202
Forks
6
PR merge metrics
No merged PRs in 30d

Description

```py
class A[*Ts]: ...
class B[**P]: ...

# unknown/projected - currently impossible
unknown_a: A[...]
unknown_b: B[...]
# `...` will now mean unknown, not Any

# variadic - currently disgusting A[*tuple[int, ...]]
variadic_a: A[*int] # ideal, but is a TypeError at runtime
variadic_b: A[*int] # ideal, but is a TypeError at runtime

variadic_a: A[Unpack[int]]
variadic_b: B[Unpack[int]]
```

Contributor guide

Open the contributing guide

Research direction

The issue names no implementation files, tests, or entry points. Start by locating handling for variadic and parameter-spec type parameters, then inspect how projected `...`, `Unpack`, and runtime subscription behavior are represented. Done means the proposed unknown and variadic forms work consistently for both `*Ts` and `**P` without the stated runtime failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.