Patchwork [2,of,2] crecord: fix mixed imports warning

login
register
mail settings
Submitter Matt Harbison
Date May 2, 2015, 2:57 a.m.
Message ID <4bcc4f2e18faf1df9801.1430535440@Envy>
Download mbox | patch
Permalink /patch/8842/
State Accepted
Commit d71492ca2fdd2405043d5c1cd6fa72f199e15310
Headers show

Comments

Matt Harbison - May 2, 2015, 2:57 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1428637627 14400
#      Thu Apr 09 23:47:07 2015 -0400
# Node ID 4bcc4f2e18faf1df980110cf8eecdeb38f35091b
# Parent  95f85481cf53e0855e9481fbd85196efcaa72455
crecord: fix mixed imports warning
Matt Mackall - May 4, 2015, 5:31 p.m.
On Fri, 2015-05-01 at 22:57 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1428637627 14400
> #      Thu Apr 09 23:47:07 2015 -0400
> # Node ID 4bcc4f2e18faf1df980110cf8eecdeb38f35091b
> # Parent  95f85481cf53e0855e9481fbd85196efcaa72455
> crecord: fix mixed imports warning

Queued for default, thanks.

Patch

diff --git a/mercurial/crecord.py b/mercurial/crecord.py
--- a/mercurial/crecord.py
+++ b/mercurial/crecord.py
@@ -20,7 +20,8 @@ 
 
 # os.name is one of: 'posix', 'nt', 'dos', 'os2', 'mac', or 'ce'
 if os.name == 'posix':
-    import curses, fcntl, termios
+    import curses
+    import fcntl, termios
 else:
     # I have no idea if wcurses works with crecord...
     try:
diff --git a/tests/test-module-imports.t b/tests/test-module-imports.t
--- a/tests/test-module-imports.t
+++ b/tests/test-module-imports.t
@@ -21,9 +21,6 @@ 
 these may expose other cycles.
 
   $ hg locate 'mercurial/**.py' | sed 's-\\-/-g' | xargs python "$import_checker"
-  mercurial/crecord.py mixed imports
-     stdlib:    fcntl, termios
-     relative:  curses
   mercurial/dispatch.py mixed imports
      stdlib:    commands
      relative:  error, extensions, fancyopts, hg, hook, util