Skip to content

Commit

Permalink
make isort happy
Browse files Browse the repository at this point in the history
  • Loading branch information
d-maurer committed Apr 27, 2020
1 parent af85c43 commit 9319c0e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
12 changes: 6 additions & 6 deletions src/RestrictedPython/tests/test_NamedExpr.py
@@ -1,10 +1,12 @@
"""Assignment expression (``NamedExpr``) tests."""


from ast import parse, NodeTransformer
from unittest import TestCase, skipUnless

from .util import check_version, compile_str
from .util import check_version
from .util import compile_str
from ast import NodeTransformer
from ast import parse
from unittest import skipUnless
from unittest import TestCase


@skipUnless(check_version("3.8"), "Feature available for Python 3.8+")
Expand Down Expand Up @@ -33,5 +35,3 @@ def visit_NamedExpr(self, node):
SyntaxError,
"Assignment expressions are only allowed for simple target"):
code, gs = compile_str(mod)


7 changes: 2 additions & 5 deletions src/RestrictedPython/tests/util.py
@@ -1,7 +1,7 @@
from .. import compile_restricted
from .. import safe_globals
from sys import version_info

from .. import compile_restricted, safe_globals


def check_version(tversion, cmp=">="):
"""compare python version against target version *tversion*."""
Expand All @@ -24,6 +24,3 @@ def compile_str(s, name="<unknown>"):
gs = safe_globals.copy()
gs["__debug__"] = True # assert active
return code, gs



0 comments on commit 9319c0e

Please sign in to comment.