Make proper functions instead of assigning lambdas

Change-Id: I89255f6923c649c7b9d3d36e96c09f8bc4f51a3c
This commit is contained in:
Tim Burke 2019-02-21 09:26:10 -08:00
parent 2ff36fde57
commit 0ee7c8272e
3 changed files with 7 additions and 3 deletions

View File

@ -1885,7 +1885,9 @@ class Connection(object):
reset = getattr(contents, 'reset', None)
if tell and seek:
orig_pos = tell()
reset_func = lambda *a, **k: seek(orig_pos)
def reset_func(*a, **kw):
seek(orig_pos)
elif reset:
reset_func = reset
return self._retry(reset_func, put_object, container, obj, contents,

View File

@ -451,7 +451,9 @@ class SwiftService(object):
**_default_local_options
)
process_options(self._options)
create_connection = lambda: get_conn(self._options)
def create_connection():
return get_conn(self._options)
self.thread_manager = MultiThreadingManager(
create_connection,
segment_threads=self._options['segment_threads'],

View File

@ -77,7 +77,7 @@ commands=
# H403: multi line docstrings should end on a new line
# H404: multi line docstring should start without a leading new line
# H405: multi line docstring summary not separated with an empty line
ignore = E731,H101,H301,H306,H401,H403,H404,H405
ignore = H101,H301,H306,H401,H403,H404,H405
show-source = True
exclude = .venv,.tox,dist,doc,*egg