-
Notifications
You must be signed in to change notification settings - Fork 189
Closed
astral-sh/ruff
#18942Description
Summary
Currently ty seems not to respect ABC inheritance.
Example:
from abc import ABC
from typing import Any, Dict
class IAppStore(ABC):
def __init__(self):
pass
def write(self, data: Dict[str, Any]): ...
def read(self) -> Dict[str, Any]: ...ty report error[invalid-return-type] <filename> Function always implicitly returns None, which is not assignable to return type dict[str, Any]on the linedef read(self) -> Dict[str, Any]: ...`.
An ABC class can not be instantiated, therefore this should not be marked as issue in my opinion because the API can only be None here.
Version
0.0.1-alpha.12 (f7446a6 2025-06-25)
Metadata
Metadata
Assignees
Labels
No labels