Skip to content

Commit 3f3e6f2

Browse files
MAINT: apply ruff/Pycodestyle rule E401
E401 Multiple imports on one line
1 parent 2abe178 commit 3f3e6f2

File tree

5 files changed

+20
-8
lines changed

5 files changed

+20
-8
lines changed

benchmarks/asv_pip_nopep517.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
"""
22
This file is used by asv_compare.conf.json.tpl.
33
"""
4-
import subprocess, sys
4+
import subprocess
5+
import sys
56
# pip ignores '--global-option' when pep517 is enabled therefore we disable it.
67
cmd = [sys.executable, '-mpip', 'wheel', '--no-use-pep517']
78
try:

numpy/_core/tests/test_cpu_features.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
import sys, platform, re, pytest
1+
import os
2+
import re
3+
import sys
4+
import pathlib
5+
import platform
6+
import subprocess
7+
import pytest
28
from numpy._core._multiarray_umath import (
39
__cpu_features__,
410
__cpu_baseline__,
511
__cpu_dispatch__,
612
)
713
import numpy as np
8-
import subprocess
9-
import pathlib
10-
import os
1114

1215
def assert_features_equal(actual, desired, fname):
1316
__tracebackhide__ = True # Hide traceback for py.test

numpy/_core/tests/test_simd.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# NOTE: Please avoid the use of numpy.testing since NPYV intrinsics
22
# may be involved in their functionality.
3-
import pytest, math, re
43
import itertools
4+
import math
55
import operator
6+
import re
7+
import pytest
68
from numpy._core._simd import targets, clear_floatstatus, get_floatstatus
79
from numpy._core._multiarray_umath import __cpu_baseline__
810

numpy/f2py/rules.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
4848
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
4949
"""
50-
import os, sys
50+
import os
51+
import sys
5152
import time
5253
import copy
5354
from pathlib import Path

numpy/f2py/tests/test_f2py2e.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
import textwrap, re, sys, subprocess, shlex
1+
import re
2+
import shlex
3+
import subprocess
4+
import sys
5+
import textwrap
26
from pathlib import Path
37
from collections import namedtuple
8+
49
import platform
510

611
import pytest

0 commit comments

Comments
 (0)