def __init__(self, source_name: str, target_name: str, weight: float = 1):
        """
        Initialization.

        Arguments:
            source_name (str): The name of the source node of the edge.
            target_name (str): The name of the target node of the edge.
            weight (float): The weight of the edge.
        """
        # We must not only declare the properties but also initialize them,
        # otherwise the IDE will show warnings wherever the properties are accessed.

        self.source_name: str = source_name
        """The name of the source node of the edge."""

        self.target_name: str = target_name
        """The name of the target node of the edge."""

        self.weight: float = weight
        """The weight of the edge."""

        raise NotImplementedError("DBEdge is just an abstract base class that defines "
                                  "the interface of actual edge model objects. "
                                  "{} - {} ({})".format(source_name, target_name, weight))
def __init__ ( self , source_name : str , target_name : str , weight : float = 1 ) : self . source_name : str = source_name self . target_name : str = target_name self . weight : float = weight raise NotImplementedError ( "DBEdge is just an abstract base class that defines " "the interface of actual edge model objects. " "{} - {} ({})" . format ( source_name , target_name , weight ) )
Initialization.

        Arguments:
            source_name (str): The name of the source node of the edge.
            target_name (str): The name of the target node of the edge.
            weight (float): The weight of the edge.