[PATCH 7 of 9 yams] [mypy] type all class.etype of all AbstractTypedAttribute subclasses

Laurent Peuch cortex at worlddomination.be
Tue Jan 14 14:18:22 CET 2020


# HG changeset patch
# User Laurent Peuch <cortex at worlddomination.be>
# Date 1579005268 -3600
#      Tue Jan 14 13:34:28 2020 +0100
# Node ID f4f9bea0e38c5522498d7b4ba59562185335bcf1
# Parent  22a132b125a363cf73a9d8434671cb7c3efdfdc6
# Available At https://hg.logilab.org/users/lpeuch/yams
#              hg pull https://hg.logilab.org/users/lpeuch/yams -r f4f9bea0e38c
[mypy] type all class.etype of all AbstractTypedAttribute subclasses

diff --git a/yams/buildobjs.py b/yams/buildobjs.py
--- a/yams/buildobjs.py
+++ b/yams/buildobjs.py
@@ -303,59 +303,59 @@ def make_type(etype):
 
 # build a specific class for each base type
 class String(AbstractTypedAttribute):
-    etype = 'String'
+    etype: str = 'String'
 
 
 class Password(AbstractTypedAttribute):
-    etype = 'Password'
+    etype: str = 'Password'
 
 
 class Bytes(AbstractTypedAttribute):
-    etype = 'Bytes'
+    etype: str = 'Bytes'
 
 
 class Int(AbstractTypedAttribute):
-    etype = 'Int'
+    etype: str = 'Int'
 
 
 class BigInt(AbstractTypedAttribute):
-    etype = 'BigInt'
+    etype: str = 'BigInt'
 
 
 class Float(AbstractTypedAttribute):
-    etype = 'Float'
+    etype: str = 'Float'
 
 
 class Boolean(AbstractTypedAttribute):
-    etype = 'Boolean'
+    etype: str = 'Boolean'
 
 
 class Decimal(AbstractTypedAttribute):
-    etype = 'Decimal'
+    etype: str = 'Decimal'
 
 
 class Time(AbstractTypedAttribute):
-    etype = 'Time'
+    etype: str = 'Time'
 
 
 class Date(AbstractTypedAttribute):
-    etype = 'Date'
+    etype: str = 'Date'
 
 
 class Datetime(AbstractTypedAttribute):
-    etype = 'Datetime'
+    etype: str = 'Datetime'
 
 
 class TZTime(AbstractTypedAttribute):
-    etype = 'TZTime'
+    etype: str = 'TZTime'
 
 
 class TZDatetime(AbstractTypedAttribute):
-    etype = 'TZDatetime'
+    etype: str = 'TZDatetime'
 
 
 class Interval(AbstractTypedAttribute):
-    etype = 'Interval'
+    etype: str = 'Interval'
 
 
 # provides a RichString factory for convenience



More information about the cubicweb-devel mailing list