(self, other: 'Pin')
Tells if a relation between two pins is typesafe.
Tells if a relation between two pins is typesafe.
Tells if a relation between two pins is typesafe .
def typesafe(self, other: 'Pin') -> bool:
        """ Tells if a relation between two pins is typesafe. """
        if self.block == other.block or self.__class__ == other.__class__:
            return False
        elif self.type_ == Type.ANY or other.type_ == Type.ANY:
            return True  # Anything is possible with ANY
        else:
            return self.type_ == other.type_
def typesafe ( self , other : 'Pin' ) -> bool : if self . block == other . block or self . __class__ == other . __class__ : return False elif self . type_ == Type . ANY or other . type_ == Type . ANY : return True # Anything is possible with ANY else : return self . type_ == other . type_