False positive incompatible override with *args + keyword-only param
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.6k
- Forks
- 1.8k
- Avg merge
- 12h 13m
- Merged PRs (30d)
- 52
Description
```
class A:
def test(self, x: int): ...
class B(A):
def test(self, *args: int, x: int = 1): ...
a: A = B()
a.test(1)
a.test(x=1)
```
The following snippet gives the error "base parameter "x" is keyword parameter, override parameter is position-only"
However, as shown from the last 2 lines, the two possible ways to call `A.test` are valid at runtime for `B.test`.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the reported A and B example through Pyright and confirm the incompatible-override diagnostic. Trace the override compatibility check for *args and keyword-only parameters; done means both shown calls are accepted while genuinely incompatible overrides remain diagnosed.
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