Exemple #1
0
 def __str__(self):
     if self.source.allow_class:
         return "The `%s` source can only solves the class or instances of this class" % (
             class_repr(self.source.source)
         )
     else:
         return "The `%s` source can only solve instances of this class" % (class_repr(self.source.source))
Exemple #2
0
 def __str__(self):
     if self.source.allow_class:
         return 'The `%s` source can only solves the class or instances of this class' % (
             class_repr(self.source.source))
     else:
         return 'The `%s` source can only solve instances of this class' % (
             class_repr(self.source.source))
Exemple #3
0
 def __str__(self):
     if self.source:
         return '`%s` is not an allowed attribute for `%s`' % (
             self.name,
             class_repr(self.source.source),
         )
     else:
         return '`%s` is not an allowed attribute' % (self.name, )
Exemple #4
0
    def __repr__(self):
        """String representation of a ``Source`` instance.

        Returns
        -------
        str
            The string representation of the current ``Source`` instance.

        Example
        -------

        >>> from datetime import date
        >>> Source(date)
        <Source 'datetime.date'>

        """

        return "<%s '%s'>" % (self.__class__.__name__, class_repr(self.source))
Exemple #5
0
    def __repr__(self):
        """String representation of a ``Source`` instance.

        Returns
        -------
        str
            The string representation of the current ``Source`` instance.

        Example
        -------

        >>> from datetime import date
        >>> Source(date)
        <Source 'datetime.date'>

        """

        return "<%s '%s'>" % (
            self.__class__.__name__,
            class_repr(self.source)
        )
Exemple #6
0
 def __str__(self):
     return '`%s` from source `%s` is not iterable' % (
         self.resource.name,
         class_repr(self.source.source),
     )
Exemple #7
0
 def __str__(self):
     return 'No solvers found for this kind of object: `%s`' % (class_repr(
         self.obj), )
Exemple #8
0
 def __str__(self):
     return 'The `%s` source is not in the registry.' % (class_repr(
         self.source))
Exemple #9
0
 def __str__(self):
     return "No solvers found for this kind of object: `%s`" % (class_repr(self.obj),)
Exemple #10
0
 def __str__(self):
     return "The `%s` source is not in the registry." % (class_repr(self.source))
Exemple #11
0
 def __str__(self):
     if self.source:
         return "`%s` is not an allowed attribute for `%s`" % (self.name, class_repr(self.source.source))
     else:
         return "`%s` is not an allowed attribute" % (self.name,)
Exemple #12
0
 def __str__(self):
     return "`%s` from source `%s` is not iterable" % (self.resource.name, class_repr(self.source.source))