KotlinIsland / KotlinIsland/basedmypy

Support `NotRequired` on classes

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

Description

To make an iterable that doesn't support `str`:
```py
class WorkProperlyIterable(Iterable[out_T], Protocol):
__contains__: NotRequired["(object) -> bool"]
```

Contributor guide

Open the contributing guide

Research direction

The issue names no files or tests; start by locating the implementation of NotRequired handling and class-based Protocol member analysis. Confirm that the shown Python syntax is accepted for __contains__ and that the resulting iterable can omit str support without producing an invalid type-checking error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.