summaryrefslogtreecommitdiff
path: root/sphinx/util/parallel.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2017-01-12 12:54:02 +0900
committerGitHub <noreply@github.com>2017-01-12 12:54:02 +0900
commit478306e052d9711170b1fbe63635edef02853484 (patch)
tree502a9e495cef7d748a5a439de35bdb4647f5f138 /sphinx/util/parallel.py
parentd170862866a576cf342d27074d009e869e3670c4 (diff)
parent76ecccf8af86568cde5310638b4ac21c1aee0042 (diff)
downloadsphinx-git-478306e052d9711170b1fbe63635edef02853484.tar.gz
Merge pull request #3327 from tk0miya/flake8
Update flake8 rules
Diffstat (limited to 'sphinx/util/parallel.py')
-rw-r--r--sphinx/util/parallel.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/util/parallel.py b/sphinx/util/parallel.py
index 4f4cd5c46..ce51ac0eb 100644
--- a/sphinx/util/parallel.py
+++ b/sphinx/util/parallel.py
@@ -117,11 +117,11 @@ def make_chunks(arguments, nproc, maxbatch=10):
chunksize = nargs // nproc
if chunksize >= maxbatch:
# try to improve batch size vs. number of batches
- chunksize = int(sqrt(nargs/nproc * maxbatch))
+ chunksize = int(sqrt(nargs / nproc * maxbatch))
if chunksize == 0:
chunksize = 1
nchunks, rest = divmod(nargs, chunksize)
if rest:
nchunks += 1
# partition documents in "chunks" that will be written by one Process
- return [arguments[i*chunksize:(i+1)*chunksize] for i in range(nchunks)]
+ return [arguments[i * chunksize:(i + 1) * chunksize] for i in range(nchunks)]