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

bad message content when class extends abstract class and defines an abstract member #913

Open
KotlinIsland opened this issue Nov 28, 2024 · 0 comments
Labels
type checking / linting issues relating to existing diagnostic rules or proposals for new diagnostic rules

Comments

@KotlinIsland
Copy link
Collaborator

KotlinIsland commented Nov 28, 2024

from abc import ABC, abstractmethod
from typing import override


class A(ABC):
    @abstractmethod
    def f(self): ...


class B(A):  # Class "B" is implicitly abstract because it extends an abstract class without implementing all abstract symbols. If this is intentional, add `ABC` to its base classes or use `metaclass=ABCMeta`.
    @abstractmethod
    def g(self): ...
    @override
    def f(self): ...

should say something like:

Class "B" is implicitly abstract because it extends an abstract class and declares an abstract symbol. If this is intentional, add ABC to its base classes or use metaclass=ABCMeta.

@KotlinIsland KotlinIsland added the type checking / linting issues relating to existing diagnostic rules or proposals for new diagnostic rules label Nov 28, 2024
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