Commit a0a1ef55 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Fixed linting after pycodestyle update.

parent 76488bd1
Pipeline #74810 passed with stages
in 39 minutes and 15 seconds
......@@ -25,6 +25,7 @@ api = Api(
validate=True)
''' Provides the flask restplus api instance for the regular NOMAD api'''
# For some unknown reason it is necessary for each fr api to have a handler.
# Otherwise the global app error handler won't be called.
@api.errorhandler(Exception)
......
......@@ -465,16 +465,15 @@ class DbUpdater:
def prep_list(self):
if self.outfile is not None and os.path.isfile(self.outfile):
uplist = self._read_from_file(self.outfile)
self.update_list = []
self.is_updated_list = []
for l in uplist:
if isinstance(l, str):
self.update_list.append(l)
for list_from_file in self._read_from_file(self.outfile):
if isinstance(list_from_file, str):
self.update_list.append(list_from_file)
self.is_updated_list.append(False)
else:
self.update_list.append(l[0])
self.is_updated_list.append(l[1])
self.update_list.append(list_from_file[0])
self.is_updated_list.append(list_from_file[1])
else:
if self.parallel > 1:
......@@ -493,6 +492,7 @@ class DbUpdater:
if self.do_download:
self.download()
@client.command(
help='Synchronizes the NOMAD database with the given external database.')
@click.argument('db_name', nargs=1, required=True)
......
......@@ -468,7 +468,7 @@ def generate_metainfo_code(metainfo_env: LegacyMetainfoEnvironment):
def format_paragraph(paragraph, first):
lines = textwrap.wrap(text=paragraph, width=width - indent * 4)
lines = [l.replace('\\', '\\\\') for l in lines]
lines = [line.replace('\\', '\\\\') for line in lines]
return textwrap.indent(
'\n'.join(lines), ' ' * 4 * indent, lambda x: not (first and x.startswith(lines[0])))
......
......@@ -416,6 +416,7 @@ def test_task_failure(monkeypatch, uploaded, task, proc_infra, test_user, with_e
if task != 'parsing':
assert 'section_run' in calc_archive
# TODO timeout
# consume_ram, segfault, and exit are not testable with the celery test worker
@pytest.mark.parametrize('failure', ['exception'])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment