Skip to content

Commit cb1bcd7

Browse files
committed
pep8
1 parent 8eaaaa0 commit cb1bcd7

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

qiniu/io.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def put(uptoken, key, data, extra=None):
5959
ret, err, code = rpc.Client(conf.UP_HOST2).call_with_multipart("/", fields, files)
6060
return ret, err
6161

62+
6263
def put_file(uptoken, key, localfile, extra=None):
6364
""" put a file to Qiniu
6465

qiniu/resumable_io.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def put_file(uptoken, key, localfile, extra):
7070
f.close()
7171
return ret, err
7272

73+
7374
def put(uptoken, key, f, fsize, extra):
7475
""" 上传二进制流, 通过将data "切片" 分段上传 """
7576
if not isinstance(extra, PutExtra):
@@ -122,6 +123,7 @@ def put_with_host(uptoken, key, f, fsize, extra, host):
122123

123124
return mkfile(mkfile_client, key, fsize, extra, host)
124125

126+
125127
def resumable_block_put(block, index, extra, uptoken, host):
126128
block_size = len(block)
127129

qiniu/test/io_test.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ def read(self, n=None):
155155
test_put_urlopen()
156156
test_put_no_length()
157157

158-
159158
def test_put_file(self):
160159
localfile = "%s" % __file__
161160
key = "test_%s" % r(9)
@@ -180,8 +179,7 @@ def test_put_fail_reqid(self):
180179
assert "reqid" in err
181180

182181
def test_put_with_uphost2(self):
183-
#mistake up host
184-
conf.UP_HOST = "api.qiniu.com"
182+
conf.UP_HOST = "api.qiniu.com" # mistake up host
185183
localfile = "%s" % __file__
186184
key = "test_up2_%s" % r(9)
187185

0 commit comments

Comments
 (0)