Apply the code reviewer suggestion of abstractmethod

This commit is contained in:
Willem Jiang
2026-04-26 20:31:06 +08:00
parent 16aedf459a
commit 653b7ae17a
2 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -12,12 +12,12 @@ class AuthProvider(ABC):
Returns User if authentication succeeds, None otherwise.
"""
...
raise NotImplementedError
@abstractmethod
async def get_user(self, user_id: str) -> "User | None":
"""Retrieve user by ID."""
...
raise NotImplementedError
# Import User at runtime to avoid circular imports