From d36f6924e6b8ecf4a7b9ba989456783baf019666 Mon Sep 17 00:00:00 2001 From: Stan Lagun Date: Wed, 10 Feb 2016 19:01:15 +0300 Subject: [PATCH] Adds abc.ABCMeta for base smart-type classes Base classes that shouldn't be instantiated directly should be marked as abstract Change-Id: Ie26e20f3c60e5e6beab3d093e82ae29195ce4d95 --- yaql/language/yaqltypes.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/yaql/language/yaqltypes.py b/yaql/language/yaqltypes.py index 48c3968..0f77639 100644 --- a/yaql/language/yaqltypes.py +++ b/yaql/language/yaqltypes.py @@ -25,16 +25,19 @@ from yaql.language import utils from yaql import yaql_interface +@six.add_metaclass(abc.ABCMeta) class HiddenParameterType(object): # noinspection PyMethodMayBeStatic,PyUnusedLocal def check(self, value, context, engine, *args, **kwargs): return True +@six.add_metaclass(abc.ABCMeta) class LazyParameterType(object): pass +@six.add_metaclass(abc.ABCMeta) class SmartType(object): def __init__(self, nullable): self.nullable = nullable