KotlinIsland / KotlinIsland/basedmypy

third party unbased callable will cause problems

Open
#700 1 comment 1 reaction 0 assignees View on GitHub
p-1
Dominant language
Python
Stars
202
Forks
6
PR merge metrics
No merged PRs in 30d

Description

```py
# third_party.py
def f(fn: Callable[[A], None]) -> Callable[[A], None]: ...

class A:
@f
def foo(self): ...

# my code
A().foo() # error: missing self arg
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the example from third_party.py, including the Callable decorator and the A().foo() call. Trace how the type checker handles the third-party callable and method binding; the work is done when the shown call no longer reports a missing self argument.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.