KotlinIsland / KotlinIsland/basedmypy

infer dunder types

Open
#392 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature good first issue topic-inference
Dominant language
Python
Stars
202
Forks
6
PR merge metrics
No merged PRs in 30d

Description

__str__ returns str
__repr__ returns str
__len__ returns int
__del__ returns None
__bool__ returns bool
__bytes__ returns bytes
__format__ returns str
__contains__ returns bool
__complex__ returns complex
__int__ returns int
__float__ returns float
__index__ returns int
__exit__: the three parameters are Optional[Type[BaseException]], Optional[BaseException], and Optional[TracebackType]
__aexit__: same as __exit__

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the type-checker's handling of dunder methods and any tests covering inferred special-method signatures. Compare the existing behavior with the listed return types and exit/aexit parameter types. Done means the listed dunder types are inferred correctly and regression tests cover them.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
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.