162 ).decode('utf-8')
163 )
164
165class TFAConfig(BaseConfig):166 """
167 Class to handle the TFA yaml file which contains secrets for e.g. TOTP
168 Config file is located at /etc/ajenti/tfa.yml and should have the following
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