Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

tidy: enforce abstract methods have ellipsis body #1881

Open
reidpr opened this issue Mar 22, 2024 · 0 comments
Open

tidy: enforce abstract methods have ellipsis body #1881

reidpr opened this issue Mar 22, 2024 · 0 comments

Comments

@reidpr
Copy link
Collaborator

reidpr commented Mar 22, 2024

Split from #1860. Pylint: W2301 unnecessary-ellipsis

@classmethod
def authenticate(class_, creds, auth_d):
"""Authenticate using the given credentials and parsed WWW-Authenticate
dictionary. Return a new Auth object if successful, None if
not. The caller is responsible for dealing with the failure."""
...

Like pass, I like the ellipsis here to make the empty body more clear. However, in this case the true error is missing @abc.abstractmethod. Can we enforce that abstract methods have an ellipsis body and vice versa?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant