Fix the pep8 issues
The stackviz repo was recently moved into gerrit and the standard python jobs were added on it. However there were some outstanding pep8 issue on the repo which is blocking any changes. This commit fixes all of them. Change-Id: I2d40ee965ba3166a580f16046fc741e05b54ac74
This commit is contained in:
parent
d28ab9cc5d
commit
59464dd081
@ -46,10 +46,11 @@ class InvalidSubunitProvider(Exception):
|
||||
class SubunitProvider(object):
|
||||
@property
|
||||
def name(self):
|
||||
"""Returns a unique name for this provider, such that a valid URL
|
||||
fragment pointing to a particular stream from this provider is
|
||||
`name_index`, applicable for paths to pages and data files making use
|
||||
of the stream.
|
||||
"""Returns a unique name for this provider,
|
||||
|
||||
The unique name is such that a valid URL fragment pointing to a
|
||||
particular stream from this provider is `name_index`, applicable
|
||||
for paths to pages and data files making use of the stream.
|
||||
|
||||
:return: a path fragment referring to the stream at `index` from this
|
||||
provider
|
||||
@ -72,8 +73,7 @@ class SubunitProvider(object):
|
||||
raise NotImplementedError()
|
||||
|
||||
def get_stream(self, index):
|
||||
"""Returns a file-like object representing the subunit stream at the
|
||||
given index.
|
||||
"""Returns a file-like object representing the subunit stream
|
||||
|
||||
:param index: the index of the stream; must be between `0` and
|
||||
`count - 1` (inclusive)
|
||||
@ -87,8 +87,7 @@ class SubunitProvider(object):
|
||||
|
||||
@property
|
||||
def streams(self):
|
||||
"""Creates a generator that iterates over each stream available in
|
||||
this provider.
|
||||
"""Creates a generator to iterate over every stream in the provider
|
||||
|
||||
:return: each stream available from this generator
|
||||
"""
|
||||
|
@ -44,6 +44,7 @@ def _get_runs(change_id):
|
||||
|
||||
return ret_list
|
||||
|
||||
|
||||
def _get_metadata(run_id):
|
||||
"""Returns a dict of run_metadata objects associated with a run_id
|
||||
|
||||
@ -56,7 +57,7 @@ def _get_metadata(run_id):
|
||||
Session = sessionmaker(bind=engine)
|
||||
session = Session()
|
||||
|
||||
metadata = api.get_run_metadata(run_id,session=session)
|
||||
metadata = api.get_run_metadata(run_id, session=session)
|
||||
ret_list = []
|
||||
|
||||
for meta in metadata:
|
||||
@ -70,6 +71,7 @@ class GerritURLEndpoint(Endpoint):
|
||||
def get(self, request, change_id):
|
||||
return _get_runs(change_id)
|
||||
|
||||
|
||||
class RunMetadataEndpoint(Endpoint):
|
||||
|
||||
def get(self, request, run_id):
|
||||
|
@ -34,7 +34,8 @@ urlpatterns = patterns('',
|
||||
GerritURLEndpoint.as_view(),
|
||||
name='gerrit_url'),
|
||||
|
||||
url(r'^api_run_id_(?P<run_id>[a-zA-Z0-9!$* \t\r\n\-]+).json$',
|
||||
url(r'^api_run_id_(?P<run_id>[a-zA-Z0-9!$* '
|
||||
'\t\r\n\-]+).json$',
|
||||
RunMetadataEndpoint.as_view(),
|
||||
name='run_metadata_url')
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user