def max_id_length(self):
        """
        Returns the maximum length of a todo ID, used for formatting purposes.
        """
        if config().identifiers() == "text":
            return max_id_length(len(self._todos))
        else:
            try:
                return math.ceil(math.log(len(self._todos), 10))
            except ValueError:
                return 0
def max_id_length ( self ) : if config ( ) . identifiers ( ) == "text" : return max_id_length ( len ( self . _todos ) ) else : try : return math . ceil ( math . log ( len ( self . _todos ) , 10 ) ) except ValueError : return 0
Returns the maximum length of a todo ID, used for formatting purposes.