Commit 98bcb280 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Fixed pylint call syntax.

parent a1cbb7e2
......@@ -47,7 +47,7 @@ python linting:
script:
- cd /app
- python -m pycodestyle --ignore=E501,E701,E731 nomad tests
- python -m pylint --load-plugins=pylint_mongoengine,nomad/metainfo/pylint_plugin nomad tests
- python -m pylint --load-plugins=pylint_mongoengine,nomad.metainfo.pylint_plugin nomad tests
- python -m mypy --ignore-missing-imports --follow-imports=silent --no-strict-optional nomad tests
except:
refs:
......
......@@ -41,7 +41,7 @@ def qa(skip_tests: bool, exitfirst: bool):
click.echo('Run code style checks ...')
ret_code += os.system('python -m pycodestyle --ignore=E501,E701,E731 nomad tests')
click.echo('Run linter ...')
ret_code += os.system('python -m pylint --load-plugins=pylint_mongoengine,nomad/metainfo/pylint_plugin nomad tests')
ret_code += os.system('python -m pylint --load-plugins=pylint_mongoengine,nomad.metainfo.pylint_plugin nomad tests')
click.echo('Run static type checks ...')
ret_code += os.system('python -m mypy --ignore-missing-imports --follow-imports=silent --no-strict-optional nomad tests')
......
......@@ -39,7 +39,7 @@ from nomad.app.v1.models import (
_entry_metadata_defaults = {
quantity.name: quantity.default
for quantity in datamodel.EntryMetadata.m_def.quantities
for quantity in datamodel.EntryMetadata.m_def.quantities # pylint: disable=not-an-iterable
if quantity.default not in [None, [], False, 0]
}
......
......@@ -104,7 +104,7 @@ def assert_dataset(dataset, query: Query = None, entries: List[str] = None, n_en
mongo_dataset = Dataset.m_def.a_mongo.objects(dataset_id=dataset_id).first()
assert mongo_dataset is not None
for quantity in Dataset.m_def.quantities:
for quantity in Dataset.m_def.quantities: # pylint: disable=not-an-iterable
if quantity in [Dataset.pid, Dataset.doi]:
assert quantity.name not in dataset or dataset[quantity.name] is not None
else:
......
......@@ -339,7 +339,7 @@ def assert_search_upload(
if __name__ == '__main__':
from test_datamodel import generate_calc
from test_datamodel import generate_calc # pylint: disable=import-error
from elasticsearch.helpers import bulk
import sys
print('Generate index with random example calculation data. First arg is number of items')
......
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