Fix flake8 F841 errors
parent
f77a690546
commit
383ba5ed9a
|
@ -2,6 +2,4 @@
|
|||
norecursedirs = .eggs .git .tox build
|
||||
|
||||
[flake8]
|
||||
ignore =
|
||||
F841, # local variable 'X' is assigned to but never used
|
||||
max-line-length = 120
|
||||
|
|
|
@ -103,7 +103,6 @@ class Main(object):
|
|||
file_name = item.meta[constants.FILENAME]
|
||||
meta_size = item.meta[constants.SIZE]
|
||||
meta_type = item.meta[constants.TYPE]
|
||||
t_upload = item.meta[constants.TIMESTAMP_UPLOAD]
|
||||
meta_hash = item.meta[constants.HASH]
|
||||
|
||||
print('checking: %s (%s %dB %s)' % (name, file_name, meta_size, meta_type))
|
||||
|
|
|
@ -8,7 +8,7 @@ def test_contains(tmpdir):
|
|||
name = "foo"
|
||||
# check if it is not there yet
|
||||
assert name not in storage
|
||||
with storage.create(name, 0) as item:
|
||||
with storage.create(name, 0):
|
||||
# we just want it created, no need to write sth into it
|
||||
pass
|
||||
# check if it is there
|
||||
|
@ -24,7 +24,7 @@ def test_iter(tmpdir):
|
|||
assert list(storage) == []
|
||||
names = ["foo", "bar", "baz", ]
|
||||
for name in names:
|
||||
with storage.create(name, 0) as item:
|
||||
with storage.create(name, 0):
|
||||
# we just want it created, no need to write sth into it
|
||||
pass
|
||||
assert set(list(storage)) == set(names)
|
||||
|
|
|
@ -42,7 +42,7 @@ def delete_if_lifetime_over(item, name):
|
|||
if 0 < item.meta[constants.TIMESTAMP_MAX_LIFE] < time.time():
|
||||
try:
|
||||
current_app.storage.remove(name)
|
||||
except (OSError, IOError) as e:
|
||||
except (OSError, IOError):
|
||||
pass
|
||||
return True
|
||||
return False
|
||||
|
|
|
@ -123,7 +123,7 @@ class DownloadRange(collections.namedtuple('DownloadRange', ('begin', 'end'))):
|
|||
|
||||
try:
|
||||
range_begin = int(range_begin)
|
||||
except ValueError as e:
|
||||
except ValueError:
|
||||
raise BadRequest(description='Range Header has no start')
|
||||
|
||||
if range_end:
|
||||
|
|
Loading…
Reference in New Issue