Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reportImplicitOverride not triggered in type stubs #6158

Closed
Avasam opened this issue Oct 14, 2023 · 2 comments
Closed

reportImplicitOverride not triggered in type stubs #6158

Avasam opened this issue Oct 14, 2023 · 2 comments
Labels
addressed in next version Issue is fixed and will appear in next published version bug Something isn't working

Comments

@Avasam
Copy link

Avasam commented Oct 14, 2023

Describe the bug
As title says. I noticed this while testing for python/typeshed#10871

Code or Screenshots

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

class B(A):
    def foo(self): ...  # Only errors in `.py` files

image

Configs have "reportImplicitOverride": "error"

If this is intended behaviour, can it be documented?

VS Code extension or command-line
pyright@1.1.331
pylance v2023.10.21

@Avasam Avasam added the bug Something isn't working label Oct 14, 2023
erictraut added a commit that referenced this issue Oct 14, 2023
…`reportIncompatibleVariableOverride` and `reportImplicitOverride`) so they apply to stub files. Previously, these were skipped for stubs. This addresses #6158.
@erictraut
Copy link
Collaborator

Good catch. I had previously disabled all override checks for stubs because older versions of typeshed violated these rules. It looks like these have been address because the latest version of stdlib stubs in typeshed do not violate any of these checks. I'll remove the special-casing for stubs.

erictraut added a commit that referenced this issue Oct 14, 2023
…`reportIncompatibleVariableOverride` and `reportImplicitOverride`) so they apply to stub files. Previously, these were skipped for stubs. This addresses #6158. (#6159)
@erictraut erictraut added the addressed in next version Issue is fixed and will appear in next published version label Oct 14, 2023
@erictraut
Copy link
Collaborator

This is included in pyright 1.1.332, which I just published. It will also be included in a future release of pylance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addressed in next version Issue is fixed and will appear in next published version bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants