diff mbox series

[1/2] support/run-tests: reorder imports

Message ID 20200213100906.11506-1-yegorslists@googlemail.com
State Accepted
Headers show
Series [1/2] support/run-tests: reorder imports | expand

Commit Message

Yegor Yefremov Feb. 13, 2020, 10:09 a.m. UTC
From: Yegor Yefremov <yegorslists@googlemail.com>

Reorder imports using the isort utility.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 support/testing/run-tests | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Peter Korsgaard Feb. 16, 2020, 2:39 p.m. UTC | #1
>>>>> "yegorslists" == yegorslists  <yegorslists@googlemail.com> writes:

 > From: Yegor Yefremov <yegorslists@googlemail.com>
 > Reorder imports using the isort utility.

Why? Does the current order cause any issues or warnings from linters?
Yegor Yefremov Feb. 17, 2020, 7:13 a.m. UTC | #2
Hi Peter,

On Sun, Feb 16, 2020 at 3:39 PM Peter Korsgaard <peter@korsgaard.com> wrote:
>
> >>>>> "yegorslists" == yegorslists  <yegorslists@googlemail.com> writes:
>
>  > From: Yegor Yefremov <yegorslists@googlemail.com>
>  > Reorder imports using the isort utility.
>
> Why? Does the current order cause any issues or warnings from linters?

I get this warning:

wrong-import-order: standard import "import multiprocessing" should be
placed before "import nose2"

Yegor
Peter Korsgaard Feb. 17, 2020, 8:02 a.m. UTC | #3
>>>>> "Yegor" == Yegor Yefremov <yegorslists@googlemail.com> writes:

 > Hi Peter,
 > On Sun, Feb 16, 2020 at 3:39 PM Peter Korsgaard <peter@korsgaard.com> wrote:
 >> 
 >> >>>>> "yegorslists" == yegorslists  <yegorslists@googlemail.com> writes:
 >> 
 >> > From: Yegor Yefremov <yegorslists@googlemail.com>
 >> > Reorder imports using the isort utility.
 >> 
 >> Why? Does the current order cause any issues or warnings from linters?

 > I get this warning:

 > wrong-import-order: standard import "import multiprocessing" should be
 > placed before "import nose2"

Ok, From what checker do you get this warning?
Yegor Yefremov Feb. 17, 2020, 8:10 a.m. UTC | #4
On Mon, Feb 17, 2020 at 9:02 AM Peter Korsgaard <peter@korsgaard.com> wrote:
>
> >>>>> "Yegor" == Yegor Yefremov <yegorslists@googlemail.com> writes:
>
>  > Hi Peter,
>  > On Sun, Feb 16, 2020 at 3:39 PM Peter Korsgaard <peter@korsgaard.com> wrote:
>  >>
>  >> >>>>> "yegorslists" == yegorslists  <yegorslists@googlemail.com> writes:
>  >>
>  >> > From: Yegor Yefremov <yegorslists@googlemail.com>
>  >> > Reorder imports using the isort utility.
>  >>
>  >> Why? Does the current order cause any issues or warnings from linters?
>
>  > I get this warning:
>
>  > wrong-import-order: standard import "import multiprocessing" should be
>  > placed before "import nose2"
>
> Ok, From what checker do you get this warning?

pylint3 support/testing/run-tests

No config file found, using default configuration
************* Module run-tests
C:  1, 0: Module name "run-tests" doesn't conform to snake_case naming
style (invalid-name)
C:  1, 0: Missing module docstring (missing-docstring)
C: 11, 0: Missing function docstring (missing-docstring)
C: 73,29: Do not use `len(SEQUENCE)` to determine if a sequence is
empty (len-as-condition)
C:115, 7: Do not use `len(SEQUENCE)` to determine if a sequence is
empty (len-as-condition)
R: 11, 0: Either all return statements in a function should return an
expression, or none of them should. (inconsistent-return-statements)
R: 11, 0: Too many return statements (7/6) (too-many-return-statements)
R: 11, 0: Too many branches (14/12) (too-many-branches)
R: 11, 0: Too many statements (64/50) (too-many-statements)
C:  6, 0: standard import "import multiprocessing" should be placed
before "import nose2" (wrong-import-order)

------------------------------------------------------------------
Your code has been rated at 8.73/10 (previous run: 8.73/10, +0.00)
Peter Korsgaard Feb. 17, 2020, 9:12 a.m. UTC | #5
>>>>> "Yegor" == Yegor Yefremov <yegorslists@googlemail.com> writes:

 > On Mon, Feb 17, 2020 at 9:02 AM Peter Korsgaard <peter@korsgaard.com> wrote:
 >> 
 >> >>>>> "Yegor" == Yegor Yefremov <yegorslists@googlemail.com> writes:
 >> 
 >> > Hi Peter,
 >> > On Sun, Feb 16, 2020 at 3:39 PM Peter Korsgaard <peter@korsgaard.com> wrote:
 >> >>
 >> >> >>>>> "yegorslists" == yegorslists  <yegorslists@googlemail.com> writes:
 >> >>
 >> >> > From: Yegor Yefremov <yegorslists@googlemail.com>
 >> >> > Reorder imports using the isort utility.
 >> >>
 >> >> Why? Does the current order cause any issues or warnings from linters?
 >> 
 >> > I get this warning:
 >> 
 >> > wrong-import-order: standard import "import multiprocessing" should be
 >> > placed before "import nose2"
 >> 
 >> Ok, From what checker do you get this warning?

 > pylint3 support/testing/run-tests

Ok, committed with that added to the commit message, thanks.
diff mbox series

Patch

diff --git a/support/testing/run-tests b/support/testing/run-tests
index 74741aee1b..77a13dc78c 100755
--- a/support/testing/run-tests
+++ b/support/testing/run-tests
@@ -1,9 +1,10 @@ 
 #!/usr/bin/env python3
 import argparse
-import sys
+import multiprocessing
 import os
+import sys
+
 import nose2
-import multiprocessing
 
 from infra.basetest import BRConfigTest