1. Katrina Walser
  2. pypy - RST fix


Alex Gaynor  committed 9e5a2dd

remove some import *s

  • Participants
  • Parent commits f39bcfa
  • Branches default

Comments (0)

Files changed (2)

File pypy/rlib/parsing/ebnfparse.py

View file
 import py
 from pypy.rlib.parsing.parsing import PackratParser, Rule
-from pypy.rlib.parsing.tree import Nonterminal, Symbol, RPythonVisitor
+from pypy.rlib.parsing.tree import Nonterminal, RPythonVisitor
 from pypy.rlib.parsing.codebuilder import Codebuilder
 from pypy.rlib.parsing.regexparse import parse_regex
-import string
-from pypy.rlib.parsing.regex import *
+from pypy.rlib.parsing.regex import StringExpression
 from pypy.rlib.parsing.deterministic import DFA
 from pypy.rlib.parsing.lexer import Lexer, DummyLexer
 from pypy.rlib.objectmodel import we_are_translated
-set = py.builtin.set
 def make_ebnf_parser():
     NONTERMINALNAME = parse_regex("([a-z]|_)[a-z0-9_]*")
     assert len(s) == 1
     s = s[0]
     rules, changes = visitor.get_rules_and_changes()
     maker = TransformerMaker(rules, changes)
     ToAstVisitor = maker.make_transformer()
         s = parser.parse(tokens)
         if not we_are_translated():
-                if py.test.config.option.view: 
+                if py.test.config.option.view:
             except AttributeError:
         return s
     return parse
             assert change == " " or change == newchange
             result.append((name, newchange))
         return result
     def visit_decorated(self, node):
         expansions = node.children[0].visit(self)
         expansions, changes = zip(*expansions)
     def create_returning_code(self, expansion, subchange):
         assert len(expansion) == len(subchange)
-        children = []
         self.emit("children = []")
         for i, (symbol, c) in enumerate(zip(expansion, subchange)):
             if c == "[":

File pypy/translator/unsimplify.py

View file
-from pypy.objspace.flow.model import *
+from pypy.objspace.flow.model import (Variable, Constant, Block, Link,
+    SpaceOperation, c_last_exception, checkgraph)
 def copyvar(annotator, v):
     """Make a copy of the Variable v, preserving annotations and concretetype."""
 def split_block(annotator, block, index, _forcelink=None):
     """return a link where prevblock is the block leading up but excluding the
-    index'th operation and target is a new block with the neccessary variables 
+    index'th operation and target is a new block with the neccessary variables
     passed on.
     assert 0 <= index <= len(block.operations)