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

reportAbstractUsage false negative when implementation is just a docstring #1009

Open
DetachHead opened this issue Jan 22, 2025 · 0 comments
Labels
type checking / linting issues relating to existing diagnostic rules or proposals for new diagnostic rules

Comments

@DetachHead
Copy link
Owner

Code sample in basedpyright playground

from abc import ABC, abstractmethod
from typing import override


class Foo(ABC):
    @abstractmethod
    def foo(self) -> None:
        ...
    @abstractmethod
    def bar(self) -> None:
        """asdf"""
    
    @abstractmethod
    def baz(self) -> None:
        raise NotImplementedError

class Bar(Foo):
    @override
    def foo(self) -> None:
        super().foo()
    @override
    def bar(self) -> None:
        super().bar() # no error
    @override
    def baz(self) -> None:
        super().baz()

related: #630

@DetachHead DetachHead added the type checking / linting issues relating to existing diagnostic rules or proposals for new diagnostic rules label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type checking / linting issues relating to existing diagnostic rules or proposals for new diagnostic rules
Projects
None yet
Development

No branches or pull requests

1 participant