-
Notifications
You must be signed in to change notification settings - Fork 281
Closed as duplicate of#1837
Copy link
Labels
Description
Describe the Bug
Pyrefly reports bad-override for a class inheriting from a mixin method using *args/**kwargs and a concrete base method with a concrete signature. Pyright accepts this pattern.
from typing import Any
class LogMixin:
def execute(self, *args: Any, **kwargs: Any) -> Any:
pass
class BaseExecutor:
def execute(self, command: str) -> str:
return command
class LoggedExecutor(LogMixin, BaseExecutor):
def execute(self, command: str, log: bool = True) -> str:
return commandThis appears to be a false positive around override signature compatibility in MRO scenarios.
Sandbox Link (Pyrefly)
Reference (Pyright)
Sandbox Link
No response
(Only applicable for extension issues) IDE Information
No response
Reactions are currently unavailable