You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Markdown: add fake base class to Pattern to fix overrides
Currently `InlineProcessor` and every subclass of it violates the `override` rule as per Liskov Substitution Principle.
Signature of "handleMatch" incompatible with supertype "Pattern" [override]
Superclass:
def handleMatch(self, m: Match[str]) -> Element | str
Subclass:
def handleMatch(self, m: Match[str], data: str) -> tuple[Element | str | None, int | None, int | None]
For all *usage* purposes these aren't actual subclasses to one another, they're handled totally separately inside `__applyPattern`.
However yes, this change totally disagrees with actual `isinstance` checks at run time (though even that is still for the best).
0 commit comments