Skip to content

Commit c851fc3

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 70ca7e9 commit c851fc3

File tree

8 files changed

+12
-6
lines changed

8 files changed

+12
-6
lines changed

doc/sphinx_util.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
"""Helper utilty function for customization."""
3+
34
import os
45
import subprocess
56
import sys

tracker/dmlc_tracker/kubernetes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
55
One need to make sure kubectl-able.
66
"""
7+
78
from __future__ import absolute_import
89

910
import yaml

tracker/dmlc_tracker/launcher.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python3
22
# pylint: disable=invalid-name
33
"""The container launcher script that launches DMLC with the right env variable."""
4+
45
from __future__ import absolute_import
56

67
import glob
@@ -55,7 +56,7 @@ def main():
5556
if hadoop_home:
5657
library_path.append("%s/lib/native" % hdfs_home)
5758
library_path.append("%s/lib" % hdfs_home)
58-
(classpath, _) = subprocess.Popen(
59+
classpath, _ = subprocess.Popen(
5960
"%s/bin/hadoop classpath" % hadoop_home,
6061
stdout=subprocess.PIPE,
6162
shell=True,

tracker/dmlc_tracker/mesos.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
55
One need to make sure all slaves machines are ssh-able.
66
"""
7+
78
from __future__ import absolute_import
89

910
import json

tracker/dmlc_tracker/mpi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def get_mpi_env(envs):
2626
return cmd
2727

2828
# decide MPI version.
29-
(out, err) = subprocess.Popen(
29+
out, err = subprocess.Popen(
3030
["mpirun", "--version"], stdout=subprocess.PIPE, stderr=subprocess.PIPE
3131
).communicate()
3232
if b"Open MPI" in out:

tracker/dmlc_tracker/opts.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# pylint: disable=invalid-name
22
"""Command line options of job submission script."""
3+
34
import argparse
45
import os
56

@@ -317,7 +318,7 @@ def get_opts(args=None):
317318
type=int,
318319
help=("Number of attempt local tracker can restart slave."),
319320
)
320-
(args, unknown) = parser.parse_known_args(args)
321+
args, unknown = parser.parse_known_args(args)
321322
args.command += unknown
322323

323324
if args.cluster is None:

tracker/dmlc_tracker/ssh.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
55
One need to make sure all slaves machines are ssh-able.
66
"""
7+
78
from __future__ import absolute_import
89

910
import logging
@@ -98,7 +99,7 @@ def run(prog):
9899
# launch jobs
99100
for i in range(nworker + nserver):
100101
pass_envs["DMLC_ROLE"] = "server" if i < nserver else "worker"
101-
(node, port) = hosts[i % len(hosts)]
102+
node, port = hosts[i % len(hosts)]
102103
pass_envs["DMLC_NODE_HOST"] = node
103104
prog = (
104105
get_env(pass_envs)

tracker/dmlc_tracker/yarn.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ def yarn_submit(args, nworker, nserver, pass_env):
5555
), "failed to build dmlc-yarn.jar, try it manually"
5656

5757
# detech hadoop version
58-
(out, _) = subprocess.Popen(
58+
out, _ = subprocess.Popen(
5959
"%s version" % hadoop_binary, shell=True, stdout=subprocess.PIPE
6060
).communicate()
6161
out = py_str(out).split("\n")[0].split()
6262
assert out[0] == "Hadoop", "cannot parse hadoop version string"
6363
hadoop_version = int(out[1].split(".")[0])
64-
(classpath, _) = subprocess.Popen(
64+
classpath, _ = subprocess.Popen(
6565
"%s classpath" % hadoop_binary, shell=True, stdout=subprocess.PIPE
6666
).communicate()
6767
classpath = py_str(classpath).strip()

0 commit comments

Comments
 (0)