mirror of
https://github.com/wassname/ray.git
synced 2026-08-11 11:24:51 +08:00
[BUILD]use first appearance of import when check order (#9119)
This commit is contained in:
@@ -37,7 +37,7 @@ def check_import(file):
|
||||
# - submodule import: `import ray.constants as ray_constants`
|
||||
# - submodule import: `from ray import xyz`
|
||||
if re.search(r"^\s*" + check + r"(\s*|\s+# noqa F401.*)$",
|
||||
line):
|
||||
line) and check_to_lines[check] == -1:
|
||||
check_to_lines[check] = i
|
||||
|
||||
for import_lib in ["import psutil", "import setproctitle"]:
|
||||
|
||||
Reference in New Issue
Block a user