]> gitweb.factorcode.org Git - factor.git/commitdiff
python: fix help-lint warnings.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 4 Mar 2014 19:06:55 +0000 (11:06 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 4 Mar 2014 19:06:55 +0000 (11:06 -0800)
extra/python/errors/errors-docs.factor
extra/python/errors/errors.factor
extra/python/python-docs.factor

index cb80e66aa027a971d3400531b7d41c0b53f62a55..49a35a6f5021d84e26bf9281138d71e3b8b694fc 100644 (file)
@@ -1,27 +1,32 @@
+USING: math help.markup help.syntax ;
 IN: python.errors
-USING: python.errors help.markup help.syntax ;
 
 HELP: check-zero
+{ $values { "code" integer } }
 { $description
   "Verifies that the return code is 0 and throws an error otherwise."
 } ;
 
 HELP: (check-ref)
+{ $values { "ref" "a python object" } }
 { $description
   "Verifies that the reference is not f and throws an error if it is."
 } ;
 
 HELP: check-new-ref
+{ $values { "ref" "a python object" } }
 { $description
   "Adds reference counting to the returned python object which is assumed to be a new reference. An error is thrown if the object is f. This word is used to wrap Python functions that return new references."
 } ;
 
 HELP: check-borrowed-ref
+{ $values { "ref" "a python object" } }
 { $description
   "Adds reference counting to the returned python object which is assumed to be a borrowed reference. An error is thrown if the object is f. This word is used to wrap Python functions that return borrowed references."
 } ;
 
 HELP: unsteal-ref
+{ $values { "ref" "a python object" } }
 { $description
   "Increases the objects reference count. Used by wrappers that call Python functions that steal references."
 } ;
index 4107a635ecfd85aa558ade74755d02e5f9beeb7c..c60b155ccb639d0cedfade983a62fcb66cad02d1 100644 (file)
@@ -14,17 +14,17 @@ ERROR: python-error type message ;
 
 PRIVATE>
 
-: (check-ref) ( ref -- ref' )
+: (check-ref) ( ref -- ref )
     [ get-error throw-error f ] unless* ;
 
-: check-new-ref ( ref -- ref' )
+: check-new-ref ( ref -- ref )
     &Py_DecRef (check-ref) ;
 
-: check-borrowed-ref ( ref -- ref' )
+: check-borrowed-ref ( ref -- ref )
     dup Py_IncRef &Py_DecRef (check-ref) ;
 
 : check-zero ( code -- )
     0 = [ get-error throw-error ] unless ;
 
-: unsteal-ref ( ref -- ref' )
+: unsteal-ref ( ref -- ref )
     dup Py_IncRef ;
index dcb320b39412d41497aa3d15d9ca1f115d8027fc..a32bbe50431342bfc73d808a955eddd6d68704fb 100644 (file)
@@ -12,7 +12,7 @@ HELP: >py
 { $description "Converts a factor objects to its most fitting python representation." }
 { $examples
   { $example
-    "USING: python ;"
+    "USING: arrays prettyprint python sequences ;"
     "10 iota >array >py py> ."
     "{ 0 1 2 3 4 5 6 7 8 9 }"
   }