Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
nomad-FAIR
Commits
98bcb280
Commit
98bcb280
authored
Feb 16, 2021
by
Markus Scheidgen
Browse files
Fixed pylint call syntax.
parent
a1cbb7e2
Changes
5
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
98bcb280
...
...
@@ -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
:
...
...
nomad/cli/dev.py
View file @
98bcb280
...
...
@@ -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'
)
...
...
nomad/search.py
View file @
98bcb280
...
...
@@ -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
]
}
...
...
tests/app/v1/routers/test_datasets.py
View file @
98bcb280
...
...
@@ -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
:
...
...
tests/test_search.py
View file @
98bcb280
...
...
@@ -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'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment