From 9c28f463727499eb94b0ad4214c0a42b49124632 Mon Sep 17 00:00:00 2001 From: ElliottKasoar <45317199+ElliottKasoar@users.noreply.github.com> Date: Mon, 18 Nov 2024 20:24:51 +0100 Subject: [PATCH] Remove pylint references --- aiida_mlip/calculations/base.py | 1 - aiida_mlip/calculations/singlepoint.py | 1 - aiida_mlip/calculations/train.py | 1 - aiida_mlip/data/model.py | 1 - aiida_mlip/helpers/help_load.py | 2 +- docs/source/conf.py | 1 - examples/calculations/submit_geomopt.py | 3 +-- examples/calculations/submit_md.py | 3 +-- examples/calculations/submit_singlepoint.py | 3 +-- tests/calculations/test_singlepoint.py | 1 - tests/conftest.py | 5 ++--- tests/data/test_model.py | 4 ---- 12 files changed, 6 insertions(+), 20 deletions(-) diff --git a/aiida_mlip/calculations/base.py b/aiida_mlip/calculations/base.py index ee03e11..9dce7bb 100644 --- a/aiida_mlip/calculations/base.py +++ b/aiida_mlip/calculations/base.py @@ -185,7 +185,6 @@ def define(cls, spec: CalcJobProcessSpec) -> None: message="Some output files missing or cannot be read", ) - # pylint: disable=too-many-locals def prepare_for_submission( self, folder: aiida.common.folders.Folder ) -> datastructures.CalcInfo: diff --git a/aiida_mlip/calculations/singlepoint.py b/aiida_mlip/calculations/singlepoint.py index 9519c37..5fc11e5 100644 --- a/aiida_mlip/calculations/singlepoint.py +++ b/aiida_mlip/calculations/singlepoint.py @@ -72,7 +72,6 @@ def define(cls, spec: CalcJobProcessSpec) -> None: print("defining outputnode") spec.default_output_node = "results_dict" - # pylint: disable=too-many-locals def prepare_for_submission( self, folder: aiida.common.folders.Folder ) -> datastructures.CalcInfo: diff --git a/aiida_mlip/calculations/train.py b/aiida_mlip/calculations/train.py index bad60ad..c262f6b 100644 --- a/aiida_mlip/calculations/train.py +++ b/aiida_mlip/calculations/train.py @@ -145,7 +145,6 @@ def define(cls, spec: CalcJobProcessSpec) -> None: message="Some output files missing or cannot be read", ) - # pylint: disable=too-many-locals def prepare_for_submission( self, folder: aiida.common.folders.Folder ) -> datastructures.CalcInfo: diff --git a/aiida_mlip/data/model.py b/aiida_mlip/data/model.py index dcdf574..406a534 100644 --- a/aiida_mlip/data/model.py +++ b/aiida_mlip/data/model.py @@ -152,7 +152,6 @@ def from_local( return cls(file=file_path, architecture=architecture, filename=filename) @classmethod - # pylint: disable=too-many-arguments def from_uri( cls, uri: str, diff --git a/aiida_mlip/helpers/help_load.py b/aiida_mlip/helpers/help_load.py index d628210..b0d7b2d 100644 --- a/aiida_mlip/helpers/help_load.py +++ b/aiida_mlip/helpers/help_load.py @@ -40,7 +40,7 @@ def load_model( """ if model is None: loaded_model = ModelData.from_uri( - "https://github.com/stfc/janus-core/raw/main/tests/models/mace_mp_small.model", # pylint: disable=line-too-long + "https://github.com/stfc/janus-core/raw/main/tests/models/mace_mp_small.model", architecture, cache_dir=cache_dir, ) diff --git a/docs/source/conf.py b/docs/source/conf.py index 9934d9f..76137ed 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -80,7 +80,6 @@ if current_year == copyright_first_year else f"{copyright_first_year}-{current_year}" ) -# pylint: disable=redefined-builtin copyright = f"{copyright_year_string}, {copyright_owners}. All rights reserved" # The version info for the project you're documenting, acts as replacement for diff --git a/examples/calculations/submit_geomopt.py b/examples/calculations/submit_geomopt.py index d68fe45..2ab64a7 100644 --- a/examples/calculations/submit_geomopt.py +++ b/examples/calculations/submit_geomopt.py @@ -107,7 +107,6 @@ def cli( opt_cell_fully, steps, ) -> None: - # pylint: disable=too-many-arguments """Click interface.""" try: code = load_code(codelabel) @@ -133,4 +132,4 @@ def cli( if __name__ == "__main__": - cli() # pylint: disable=no-value-for-parameter + cli() diff --git a/examples/calculations/submit_md.py b/examples/calculations/submit_md.py index a117ecd..0af7177 100644 --- a/examples/calculations/submit_md.py +++ b/examples/calculations/submit_md.py @@ -91,7 +91,6 @@ def cli( codelabel, struct, model, arch, device, precision, ensemble, md_dict_str ) -> None: """Click interface.""" - # pylint: disable=too-many-arguments md_dict = ast.literal_eval(md_dict_str) try: code = load_code(codelabel) @@ -115,4 +114,4 @@ def cli( if __name__ == "__main__": - cli() # pylint: disable=no-value-for-parameter + cli() diff --git a/examples/calculations/submit_singlepoint.py b/examples/calculations/submit_singlepoint.py index abde59b..275247d 100644 --- a/examples/calculations/submit_singlepoint.py +++ b/examples/calculations/submit_singlepoint.py @@ -75,7 +75,6 @@ def singlepoint(params: dict) -> None: "--precision", default="float64", type=str, help="Chosen level of precision." ) def cli(codelabel, struct, model, arch, device, precision) -> None: - # pylint: disable=too-many-arguments """Click interface.""" try: code = load_code(codelabel) @@ -97,4 +96,4 @@ def cli(codelabel, struct, model, arch, device, precision) -> None: if __name__ == "__main__": - cli() # pylint: disable=no-value-for-parameter + cli() diff --git a/tests/calculations/test_singlepoint.py b/tests/calculations/test_singlepoint.py index fea52fb..5546a63 100644 --- a/tests/calculations/test_singlepoint.py +++ b/tests/calculations/test_singlepoint.py @@ -66,7 +66,6 @@ def test_sp_nostruct(fixture_sandbox, generate_calc_job, model_folder, janus_cod """Test singlepoint calculation with error input.""" entry_point_name = "mlip.sp" model_file = model_folder / "mace_mp_small.model" - # pylint:disable=line-too-long inputs = { "metadata": {"options": {"resources": {"num_machines": 1}}}, "code": janus_code, diff --git a/tests/conftest.py b/tests/conftest.py index 7c83290..4d57472 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,3 @@ -# pylint: disable=redefined-outer-name,too-many-statements """Initialise a text database and profile for pytest.""" import os @@ -13,11 +12,11 @@ from aiida.plugins import CalculationFactory import pytest -pytest_plugins = ["aiida.manage.tests.pytest_fixtures"] # pylint: disable=invalid-name +pytest_plugins = ["aiida.manage.tests.pytest_fixtures"] @pytest.fixture(scope="function", autouse=True) -def clear_database_auto(aiida_profile_clean): # pylint: disable=unused-argument +def clear_database_auto(aiida_profile_clean): """Automatically clear database in between tests.""" diff --git a/tests/data/test_model.py b/tests/data/test_model.py index 09cddfe..40ee04d 100644 --- a/tests/data/test_model.py +++ b/tests/data/test_model.py @@ -44,7 +44,6 @@ def test_download_fresh_file_keep(tmp_path): path_test.unlink(missing_ok=True) # Construct a ModelData instance downloading a non-cached file - # pylint:disable=line-too-long model = ModelData.from_uri( uri="https://github.com/stfc/janus-core/raw/main/tests/models/mace_mp_small.model", filename="mace.model", @@ -65,7 +64,6 @@ def test_download_fresh_file(tmp_path): path_test.unlink(missing_ok=True) # Construct a ModelData instance downloading a non-cached file - # pylint:disable=line-too-long model = ModelData.from_uri( uri="https://github.com/stfc/janus-core/raw/main/tests/models/mace_mp_small.model", filename="mace.model", @@ -80,7 +78,6 @@ def test_download_fresh_file(tmp_path): def test_no_download_cached_file(tmp_path): """Test if the caching prevents saving duplicate model in the database.""" - # pylint:disable=line-too-long existing_model = ModelData.from_uri( uri="https://github.com/stfc/janus-core/raw/main/tests/models/mace_mp_small.model", filename="mace_existing.model", @@ -88,7 +85,6 @@ def test_no_download_cached_file(tmp_path): architecture="mace_mp", ) # Construct a ModelData instance that should use the cached file - # pylint:disable=line-too-long model = ModelData.from_uri( uri="https://github.com/stfc/janus-core/raw/main/tests/models/mace_mp_small.model", cache_dir=tmp_path,