Waldemar Kornewald avatar Waldemar Kornewald committed cc399e1

fixed pep8

Comments (0)

Files changed (1)

pyvascript/grammar.py

         indentstr = '  ' * indentation
         sep = '\n%s' % indentstr
         if self.local_vars:
-            var = '%svar %s;\n%s' % (indentstr, ', '.join(sorted(self.local_vars)), indentstr)
+            vars = ', '.join(sorted(self.local_vars))
+            var = '%svar %s;\n%s' % (indentstr, vars, indentstr)
         else:
             var = indentstr
         return '{\n%s%s\n%s}' % (var, sep.join(stmts), '  ' * (indentation - 1))
         index = self.make_temp_var('index')
         init = 'var %s = _$pyva_iter(%s);\n%svar %s = %s.length;\n%s' % (
             datavar, data, indentstr, lenvar, datavar, indentstr)
-        body = body.replace('{', '{\n%s%s = %s[%s];\n' % (indentstr + '  ', var, datavar, index), 1)
-        return '%sfor (var %s = 0; %s < %s; %s++) %s' % (init, index, index, lenvar, index, body)
+        body = body.replace('{', '{\n%s%s = %s[%s];\n'
+                            % (indentstr + '  ', var, datavar, index), 1)
+        return '%sfor (var %s = 0; %s < %s; %s++) %s' % (init, index, index, lenvar,
+                                                         index, body)
 
     def temp_var_or_literal(self, name, var, init):
         """
     def make_for_reversed_range(self, var, for_range, body):
         indentstr = '  ' * self.indentation
         if len(for_range) == 1:
-            return '%s = %s;\n%swhile (%s--) %s' % (var, for_range[0][1], indentstr, var, body)
+            return '%s = %s;\n%swhile (%s--) %s' % (var, for_range[0][1], indentstr,
+                                                    var, body)
 
         init = []
         start = for_range[1][1]
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.