changeset 298:d5cbf4fc1416

Use python 3 syntax for ABCMeta in DataValidator
author Amine Sehili <amine.sehili@gmail.com>
date Tue, 08 Oct 2019 20:01:34 +0100
parents 7259b1eb9329
children 73989d247f4e
files auditok/util.py
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/auditok/util.py	Tue Oct 08 19:48:13 2019 +0100
+++ b/auditok/util.py	Tue Oct 08 20:01:34 2019 +0100
@@ -99,15 +99,12 @@
         """
 
 
-class DataValidator:
+class DataValidator(metaclass=ABCMeta):
     """
     Base class for a validator object used by :class:`.core.StreamTokenizer` to check
     if read data is valid.
     Subclasses should implement :func:`is_valid` method.
-    """
-
-    __metaclass__ = ABCMeta
-
+   """
     @abstractmethod
     def is_valid(self, data):
         """