Commits

Anonymous committed 6c9f7b1

Another step towards config/opt documenting

  • Participants
  • Parent commits dbeba52

Comments (0)

Files changed (1)

File nose2/sphinxext.py

     def as_int(self, item, default=DEFAULT):
         self.vars[item] = {'type': 'integer',
                            'default': default}
-    #as_float
-    #as_str
-    #as_list
-    #__getitem__
-    #get
-
+    def as_float(self, item, default=DEFAULT):
+        self.vars[item] = {'type': 'float',
+                           'default': default}
+    def as_str(self, item, default=DEFAULT):
+        self.vars[item] = {'type': 'str',
+                           'default': default}
+    def as_list(self, item, default=DEFAULT):
+        self.vars[item] = {'type': 'list',
+                           'default': default}
+    def __getitem__(self, item):
+        self.vars[item] = {'type': None,
+                           'default': DEFAULT}
+    def get(self, item, default=DEFAULT):
+        self.vars[item] = {'type': None,
+                           'default': default}
 
 
 class OptBucket(object):