mailr19062 - /trunk/lib/arg_check.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on March 23, 2013 - 10:49:
Author: bugman
Date: Sat Mar 23 10:49:10 2013
New Revision: 19062

URL: http://svn.gna.org/viewcvs/relax?rev=19062&view=rev
Log:
Fix for the lib.arg_check module for the shift of check_type module into the 
lib package.


Modified:
    trunk/lib/arg_check.py

Modified: trunk/lib/arg_check.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/arg_check.py?rev=19062&r1=19061&r2=19062&view=diff
==============================================================================
--- trunk/lib/arg_check.py (original)
+++ trunk/lib/arg_check.py Sat Mar 23 10:49:10 2013
@@ -79,7 +79,7 @@
         return True
 
     # Check for a float.
-    if check_types.is_float(arg):
+    if lib.check_types.is_float(arg):
         return True
 
     # Fail.
@@ -129,7 +129,7 @@
     else:
         for i in range(len(arg)):
             # Fail if not a float.
-            if not check_types.is_float(arg[i]):
+            if not lib.check_types.is_float(arg[i]):
                 fail = True
 
     # Fail.
@@ -204,7 +204,7 @@
 
             # Check for float elements.
             for j in range(len(arg[i])):
-                if not check_types.is_float(arg[i][j]):
+                if not lib.check_types.is_float(arg[i][j]):
                     fail = True
 
     # Fail.
@@ -284,7 +284,7 @@
 
         # Check for float elements.
         for i in range(len(elements)):
-            if not check_types.is_float(elements[i]):
+            if not lib.check_types.is_float(elements[i]):
                 fail = True
 
     # Fail.
@@ -623,7 +623,7 @@
         return True
 
     # Check for floats and integers (avoiding Booleans).
-    if (check_types.is_float(arg) or isinstance(arg, int)) and not 
isinstance(arg, bool):
+    if (lib.check_types.is_float(arg) or isinstance(arg, int)) and not 
isinstance(arg, bool):
         return True
 
     # Fail.
@@ -679,7 +679,7 @@
 
         # Fail if not numbers.
         for i in range(len(arg)):
-            if (not check_types.is_float(arg[i]) and not isinstance(arg[i], 
int)) or isinstance(arg, bool):
+            if (not lib.check_types.is_float(arg[i]) and not 
isinstance(arg[i], int)) or isinstance(arg, bool):
                 fail = True
 
     # Fail.
@@ -810,7 +810,7 @@
 
         # Fail if not numbers.
         for i in range(len(arg)):
-            if (not check_types.is_float(arg[i]) and not isinstance(arg[i], 
int)) or isinstance(arg, bool):
+            if (not lib.check_types.is_float(arg[i]) and not 
isinstance(arg[i], int)) or isinstance(arg, bool):
                 fail = True
 
     # Fail.
@@ -962,7 +962,7 @@
         return True
 
     # Check for a string.
-    if isinstance(arg, str) or check_types.is_filetype(arg) or 
isinstance(arg, DummyFileObject):
+    if isinstance(arg, str) or lib.check_types.is_filetype(arg) or 
isinstance(arg, DummyFileObject):
         return True
 
     # Fail.




Related Messages


Powered by MHonArc, Updated Sat Mar 23 11:20:02 2013