Skip to content

Commit 63c98e3

Browse files
authored
Enforce python import ordering rules. NFC (#25594)
This change was automatically generated using `ruff check --fix`
1 parent 023eaf9 commit 63c98e3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+504
-315
lines changed

em++.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# found in the LICENSE file.
66

77
import sys
8+
89
import emcc
910
from tools import shared
1011

em-config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
is found, or exits with 1 if the variable does not exist.
1515
"""
1616

17-
import sys
1817
import re
18+
import sys
19+
1920
from tools import config
2021

2122

emar.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"""
99

1010
import sys
11+
1112
from tools import shared
1213

1314
shared.exec_process([shared.LLVM_AR] + sys.argv[1:])

embuilder.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,10 @@
2020
import time
2121
from contextlib import contextmanager
2222

23-
from tools import cache
24-
from tools import shared
25-
from tools import system_libs
26-
from tools import ports
27-
from tools import utils
23+
from tools import cache, ports, shared, system_libs, utils
2824
from tools.settings import settings
2925
from tools.system_libs import USE_NINJA
3026

31-
3227
# Minimal subset of targets used by CI systems to build enough to be useful
3328
MINIMAL_TASKS = [
3429
'libcompiler_rt',

emcc.py

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,38 @@
2020
slows down compilation).
2121
"""
2222

23-
from tools.toolchain_profiler import ToolchainProfiler
24-
2523
import logging
2624
import os
2725
import shlex
2826
import shutil
2927
import sys
30-
import time
3128
import tarfile
29+
import time
3230
from dataclasses import dataclass
3331
from enum import Enum, auto, unique
3432

35-
36-
from tools import shared, system_libs, utils, cmdline
37-
from tools import diagnostics, building, compile
38-
from tools.shared import exit_with_error, DEBUG
39-
from tools.shared import in_temp
40-
from tools.shared import DYLIB_EXTENSIONS
33+
from tools import (
34+
building,
35+
cache,
36+
cmdline,
37+
compile,
38+
config,
39+
diagnostics,
40+
shared,
41+
system_libs,
42+
utils,
43+
)
4144
from tools.cmdline import CLANG_FLAGS_WITH_ARGS
4245
from tools.response_file import substitute_response_files
43-
from tools import config
44-
from tools import cache
45-
from tools.settings import default_setting, user_settings, settings, COMPILE_TIME_SETTINGS
46-
from tools.utils import read_file, unsuffixed_basename, get_file_suffix
46+
from tools.settings import (
47+
COMPILE_TIME_SETTINGS,
48+
default_setting,
49+
settings,
50+
user_settings,
51+
)
52+
from tools.shared import DEBUG, DYLIB_EXTENSIONS, exit_with_error, in_temp
53+
from tools.toolchain_profiler import ToolchainProfiler
54+
from tools.utils import get_file_suffix, read_file, unsuffixed_basename
4755

4856
logger = logging.getLogger('emcc')
4957

emcmake.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
import shlex
99
import shutil
1010
import sys
11-
from tools import shared
12-
from tools import config
13-
from tools import utils
11+
12+
from tools import config, shared, utils
1413

1514

1615
#

emconfigure.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
import os
2020
import shlex
2121
import sys
22-
from tools import building
23-
from tools import shared
22+
23+
from tools import building, shared
2424

2525

2626
#

emmake.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@
2525
import shlex
2626
import shutil
2727
import sys
28-
from tools import building
29-
from tools import shared
30-
from tools import utils
28+
29+
from tools import building, shared, utils
3130

3231

3332
#

emranlib.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"""
1212

1313
import sys
14+
1415
from tools import shared
1516

1617
shared.exec_process([shared.LLVM_RANLIB] + sys.argv[1:])

emrun.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,11 @@
3838
from operator import itemgetter
3939

4040
if sys.version_info.major == 2:
41+
from urllib import unquote
42+
4143
import SocketServer as socketserver
4244
from BaseHTTPServer import HTTPServer
4345
from SimpleHTTPServer import SimpleHTTPRequestHandler
44-
from urllib import unquote
4546
from urlparse import urlsplit
4647
else:
4748
import socketserver

0 commit comments

Comments
 (0)