KotlinIsland / KotlinIsland/basedmypy

A `NoInfer` annotation modifier

Open
#216 0 comments 1 reaction 0 assignees View on GitHub
feature generic modifier
Dominant language
Python
Stars
202
Forks
6
PR merge metrics
No merged PRs in 30d

Description

```py
class A(Generic[T]):
def __init__(self, t: NoInfer[T]): ...

A(1) # error: could not infer type of 'T', please specify it explicitly
```
```py
def test1(a: T, b: NoInfer[T]): ...
def test2(a: T, b: T): ...

test1(1, 'a') # error, expected int, found str
test2(1, 'a') # no error, expected object, found str
```

Contributor guide

Open the contributing guide

Research direction

No implementation files, tests, or entry points are named. Use the two examples as behavioral targets: verify that NoInfer prevents inference from that argument while preserving the expected type checks, and add coverage for both the generic constructor and function-call cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.