608 )
609
610
611class AutoEscapeExtension(Extension):612 def __init__(self, environment: Environment) -> None:
613 super().__init__(environment)
614 warnings.warn(
597 return nodes.Continue(lineno=token.lineno)
598
599
600class WithExtension(Extension):601 def __init__(self, environment: Environment) -> None:
602 super().__init__(environment)
603 warnings.warn(
A method marked with @abstractmethod
is not defined in the concrete class. This can result in unintended behavior.
It is recommended to implement all abstract methods in the derived classes.
from abc import ABC, abstractmethod
class Vehicle(ABC):
@abstractmethod
def start():
pass
class Car(Vehicle):
# No overridden `start` method here. Can cause unintended behavior
def stop():
self.speed = 0
from abc import ABC, abstractmethod
class Vehicle(ABC):
@abstractmethod
def start():
pass
class Car(Vehicle):
def start():
self.speed = 3
def stop():
self.speed = 0