Skip to content

Commit 8c4d374

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

17 files changed

Lines changed: 22 additions & 31 deletions

File tree

‎doc/conf.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
#
32
# documentation build configuration file, created by
43
# sphinx-quickstart on Thu Jul 23 19:40:08 2015.

‎doc/sphinx_util.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# -*- coding: utf-8 -*-
21
"""Helper utilty function for customization."""
2+
33
import os
44
import subprocess
55
import sys

‎include/dmlc/concurrentqueue.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,11 @@ struct thread_id_converter<thread_id_t> {
158158
typedef thread_id_numeric_size_t thread_id_hash_t;
159159
#endif
160160

161-
static thread_id_hash_t prehash(thread_id_t const &x) {
161+
static thread_id_hash_t prehash(const thread_id_t &x) {
162162
#ifndef __APPLE__
163163
return std::hash<std::thread::id>()(x);
164164
#else
165-
return *reinterpret_cast<thread_id_hash_t const *>(&x);
165+
return *reinterpret_cast<const thread_id_hash_t *>(&x);
166166
#endif
167167
}
168168
};

‎src/data/text_parser.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ class TextParserBase : public ParserImpl<IndexType, DType> {
5353
* \param end end of buffer
5454
*/
5555
virtual void ParseBlock(
56-
const char *begin, const char *end, RowBlockContainer<IndexType, DType> *out)
57-
= 0;
56+
const char *begin, const char *end, RowBlockContainer<IndexType, DType> *out) = 0;
5857
/*!
5958
* \brief read in next several blocks of data
6059
* \param data vector of data to be returned

‎tracker/dmlc_tracker/__init__.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
"""DMLC Tracker modules for running jobs on different platforms."""
22

3-
from __future__ import absolute_import

‎tracker/dmlc_tracker/kubernetes.py‎

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

99
import yaml
1010
from kubernetes import client, config

‎tracker/dmlc_tracker/launcher.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +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-
from __future__ import absolute_import
4+
55

66
import glob
77
import os
@@ -55,7 +55,7 @@ def main():
5555
if hadoop_home:
5656
library_path.append("%s/lib/native" % hdfs_home)
5757
library_path.append("%s/lib" % hdfs_home)
58-
(classpath, _) = subprocess.Popen(
58+
classpath, _ = subprocess.Popen(
5959
"%s/bin/hadoop classpath" % hadoop_home,
6060
stdout=subprocess.PIPE,
6161
shell=True,

‎tracker/dmlc_tracker/local.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""Submission job for local jobs."""
22

33
# pylint: disable=invalid-name
4-
from __future__ import absolute_import
54

65
import logging
76
import os

‎tracker/dmlc_tracker/mesos.py‎

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

99
import json
1010
import logging

‎tracker/dmlc_tracker/mpi.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"""
44

55
# pylint: disable=invalid-name
6-
from __future__ import absolute_import
76

87
import logging
98
import subprocess
@@ -26,7 +25,7 @@ def get_mpi_env(envs):
2625
return cmd
2726

2827
# decide MPI version.
29-
(out, err) = subprocess.Popen(
28+
out, err = subprocess.Popen(
3029
["mpirun", "--version"], stdout=subprocess.PIPE, stderr=subprocess.PIPE
3130
).communicate()
3231
if b"Open MPI" in out:

0 commit comments

Comments
 (0)