selectors.py
changeset 10612 84468b90e9c1
parent 9013 b4bcabf55e77
equal deleted inserted replaced
10611:f4dec0cca9a1 10612:84468b90e9c1
    15 #
    15 #
    16 # You should have received a copy of the GNU Lesser General Public License along
    16 # You should have received a copy of the GNU Lesser General Public License along
    17 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
    17 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
    18 
    18 
    19 from warnings import warn
    19 from warnings import warn
       
    20 
       
    21 from six import string_types
    20 
    22 
    21 from logilab.common.deprecation import deprecated, class_renamed
    23 from logilab.common.deprecation import deprecated, class_renamed
    22 
    24 
    23 from cubicweb.predicates import *
    25 from cubicweb.predicates import *
    24 
    26 
    82 class _but_etype(EntityPredicate):
    84 class _but_etype(EntityPredicate):
    83     """accept if the given entity types are not found in the result set.
    85     """accept if the given entity types are not found in the result set.
    84 
    86 
    85     See `EntityPredicate` documentation for behaviour when row is not specified.
    87     See `EntityPredicate` documentation for behaviour when row is not specified.
    86 
    88 
    87     :param *etypes: entity types (`basestring`) which should be refused
    89     :param *etypes: entity types (`string_types`) which should be refused
    88     """
    90     """
    89     def __init__(self, *etypes):
    91     def __init__(self, *etypes):
    90         super(_but_etype, self).__init__()
    92         super(_but_etype, self).__init__()
    91         self.but_etypes = etypes
    93         self.but_etypes = etypes
    92 
    94