Revision: 2494
Author: janne.t.harkonen
Date: Mon Feb 22 04:41:34 2010
Log: whitespace
http://code.google.com/p/robotframework/source/detail?r=2494

Modified:
 /trunk/src/robot/utils/misc.py

=======================================
--- /trunk/src/robot/utils/misc.py      Wed Feb 17 08:19:50 2010
+++ /trunk/src/robot/utils/misc.py      Mon Feb 22 04:41:34 2010
@@ -43,9 +43,9 @@
     'more   spaces'    -> 'More Spaces'
     'Cases AND spaces' -> 'Cases AND Spaces'
     ''                 -> ''
-
+
     If 'code_style' is True:
-
+
     'mixedCAPSCamel'   -> 'Mixed CAPS Camel'
     'camelCaseName'    -> 'Camel Case Name'
     'under_score_name' -> 'Under Score Name'
@@ -66,11 +66,11 @@

 def _splitCamelCaseString(string):
     parts = []
-    current_part = []
+    current_part = []
string = ' ' + string + ' ' # extra spaces make going through string easier
     for i in range(1, len(string)-1):
         # on 1st/last round prev/next is ' ' and char is 1st/last real char
-        prev, char, next = string[i-1:i+2]
+        prev, char, next = string[i-1:i+2]
         if _isWordBoundary(prev, char, next):
             parts.append(''.join(current_part))
             current_part = [ char ]
@@ -90,9 +90,9 @@

 def cygpath(path, options='-wa'):
     """Converts given path using Cygwin command 'cygpath'.
-
+
     Default options convert unixy path to an absolute Windows path.
-
+
     Returns path unmodified if not in Cygwin.
     """
     if 'cygwin' not in sys.platform:
@@ -101,7 +101,7 @@
     winpath = output.read().splitlines()[0]
     output.close()
     return winpath
-
+

 def get_temp_dir(extrapath=None):
     tempdir = os.path.normpath(tempfile.gettempdir())
@@ -125,12 +125,12 @@
         return list_or_int != 1 and "s" or ""
     else:
         return len(list_or_int) != 1 and "s" or ""
-
+

def seq2str(sequence, quote="'", sep=', ', lastsep=' and ', quote_all=False):
     """Returns sequence in format 'item 1', 'item 2' and 'item 3' """
     def elem(string):
-        if not is_str and not quote_all:
+        if not is_str and not quote_all:
             return unic(string)
         return quote + unic(string) + quote

@@ -158,7 +158,7 @@

 def printable_name_from_path(path):
     """Create suite name from given path that points to file or directory.
-
+
     Examples:
         '/tmp/tests.py'         -> 'Tests'
         '/var/data/my_tests/    -> 'My Tests'
@@ -176,7 +176,7 @@

 def get_directory(path):
     """Returns the directory part of the given path.
-
+
     If path already is a directory returns it as is, otherwise returns the
     directory containing the file
     """
@@ -186,7 +186,7 @@
     if os.path.isdir(path):
         return path
     return os.path.dirname(path)
-
+

 def get_link_path(target, base):
"""Returns a relative path to a target from a base. If base is an existing
@@ -244,12 +244,12 @@
     pass_percent = round(pass_percent, 1)
     fail_percent = round(fail_percent, 1)
     return pass_percent, fail_percent
-
+

 def percents_to_widths(num1, num2):
     if num1 + num2 == 0:
         return 0.00, 0.00
-    # Make small percentages better visible
+    # Make small percentages better visible
     if 0 < num1 < 1:
         num1, num2= 1.0, 99.0
     elif 0 < num2 < 1:

Reply via email to