Esempio n. 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))
Esempio n. 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))
Esempio n. 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, )
Esempio n. 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))
Esempio n. 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)
        )
Esempio n. 6
0
 def __str__(self):
     return '`%s` from source `%s` is not iterable' % (
         self.resource.name,
         class_repr(self.source.source),
     )
Esempio n. 7
0
 def __str__(self):
     return 'No solvers found for this kind of object: `%s`' % (class_repr(
         self.obj), )
Esempio n. 8
0
 def __str__(self):
     return 'The `%s` source is not in the registry.' % (class_repr(
         self.source))
Esempio n. 9
0
 def __str__(self):
     return "No solvers found for this kind of object: `%s`" % (class_repr(self.obj),)
Esempio n. 10
0
 def __str__(self):
     return "The `%s` source is not in the registry." % (class_repr(self.source))
Esempio n. 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,)
Esempio n. 12
0
 def __str__(self):
     return "`%s` from source `%s` is not iterable" % (self.resource.name, class_repr(self.source.source))