Make `ignore_pos_arg_names=False` for overrides when using `--extra-checks`
Open
Nobody has claimed this yet.
feature
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
Feature
We can check positional argument names for overriding functions.
class A:
def f(self, x: int) -> None:
pass
class B(A):
def f(self, _x: int) -> None: # this *should* error, but doesn't currently
pass
Pitch
Well, ignoring positional arguments is obviously not type safe. It's annoying, sure, but in my mind that's the class of checks that --extra-checks encompasses (technically correct but annoying).
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 tracing override checking and the handling of positional argument names when --extra-checks is enabled. Confirm the existing behavior with the A and B example, then add coverage showing that differing positional names are reported under --extra-checks and that the check remains ignored otherwise.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100