From 156f7be248fc5706968ec9656d94a81fcc98fb6f Mon Sep 17 00:00:00 2001 From: Andreas Pedersen Date: Wed, 13 Nov 2024 15:18:39 +0100 Subject: [PATCH] ruff --- src/easyreflectometry/model/model.py | 4 ++-- .../sample/elements/layers/layer_area_per_molecule.py | 2 +- .../sample/elements/materials/material_density.py | 2 +- .../sample/elements/materials/material_mixture.py | 2 +- tests/sample/elements/layers/test_layer.py | 2 +- tests/sample/elements/materials/test_material.py | 2 +- tests/test_project.py | 1 - 7 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/easyreflectometry/model/model.py b/src/easyreflectometry/model/model.py index dceb4fe1..e16a369d 100644 --- a/src/easyreflectometry/model/model.py +++ b/src/easyreflectometry/model/model.py @@ -12,10 +12,10 @@ from easyscience.Objects.new_variable import Parameter from easyscience.Objects.ObjectClasses import BaseObj -from easyreflectometry.utils import get_as_parameter -from easyreflectometry.utils import yaml_dump from easyreflectometry.sample import BaseAssembly from easyreflectometry.sample import Sample +from easyreflectometry.utils import get_as_parameter +from easyreflectometry.utils import yaml_dump from .resolution_functions import PercentageFhwm from .resolution_functions import ResolutionFunction diff --git a/src/easyreflectometry/sample/elements/layers/layer_area_per_molecule.py b/src/easyreflectometry/sample/elements/layers/layer_area_per_molecule.py index 132286df..fea67833 100644 --- a/src/easyreflectometry/sample/elements/layers/layer_area_per_molecule.py +++ b/src/easyreflectometry/sample/elements/layers/layer_area_per_molecule.py @@ -6,9 +6,9 @@ from easyscience.Constraints import FunctionalConstraint from easyscience.Objects.new_variable import Parameter -from easyreflectometry.utils import get_as_parameter from easyreflectometry.special.calculations import area_per_molecule_to_scattering_length_density from easyreflectometry.special.calculations import neutron_scattering_length +from easyreflectometry.utils import get_as_parameter from ..materials.material import Material from ..materials.material_solvated import DEFAULTS as MATERIAL_SOLVATED_DEFAULTS diff --git a/src/easyreflectometry/sample/elements/materials/material_density.py b/src/easyreflectometry/sample/elements/materials/material_density.py index e513ba2a..388f6e84 100644 --- a/src/easyreflectometry/sample/elements/materials/material_density.py +++ b/src/easyreflectometry/sample/elements/materials/material_density.py @@ -6,10 +6,10 @@ from easyscience.Constraints import FunctionalConstraint from easyscience.Objects.new_variable import Parameter -from easyreflectometry.utils import get_as_parameter from easyreflectometry.special.calculations import density_to_sld from easyreflectometry.special.calculations import molecular_weight from easyreflectometry.special.calculations import neutron_scattering_length +from easyreflectometry.utils import get_as_parameter from .material import DEFAULTS as MATERIAL_DEFAULTS from .material import Material diff --git a/src/easyreflectometry/sample/elements/materials/material_mixture.py b/src/easyreflectometry/sample/elements/materials/material_mixture.py index 49981bda..f3f558d9 100644 --- a/src/easyreflectometry/sample/elements/materials/material_mixture.py +++ b/src/easyreflectometry/sample/elements/materials/material_mixture.py @@ -5,8 +5,8 @@ from easyscience.Constraints import FunctionalConstraint from easyscience.Objects.new_variable import Parameter -from easyreflectometry.utils import get_as_parameter from easyreflectometry.special.calculations import weighted_average +from easyreflectometry.utils import get_as_parameter from ...base_core import BaseCore from .material import DEFAULTS as MATERIAL_DEFAULTS diff --git a/tests/sample/elements/layers/test_layer.py b/tests/sample/elements/layers/test_layer.py index 1079a1d3..7d6cb6bd 100644 --- a/tests/sample/elements/layers/test_layer.py +++ b/tests/sample/elements/layers/test_layer.py @@ -13,10 +13,10 @@ from numpy.testing import assert_equal from easyreflectometry.calculators.factory import CalculatorFactory -from easyreflectometry.utils import get_as_parameter from easyreflectometry.sample.elements.layers.layer import DEFAULTS from easyreflectometry.sample.elements.layers.layer import Layer from easyreflectometry.sample.elements.materials.material import Material +from easyreflectometry.utils import get_as_parameter class TestLayer(unittest.TestCase): diff --git a/tests/sample/elements/materials/test_material.py b/tests/sample/elements/materials/test_material.py index 93eaec8c..8ef9b9d0 100644 --- a/tests/sample/elements/materials/test_material.py +++ b/tests/sample/elements/materials/test_material.py @@ -8,9 +8,9 @@ import numpy as np from easyscience import global_object -from easyreflectometry.utils import get_as_parameter from easyreflectometry.sample.elements.materials.material import DEFAULTS from easyreflectometry.sample.elements.materials.material import Material +from easyreflectometry.utils import get_as_parameter class TestMaterial: diff --git a/tests/test_project.py b/tests/test_project.py index 095b1581..f4211950 100644 --- a/tests/test_project.py +++ b/tests/test_project.py @@ -8,7 +8,6 @@ from easyscience.fitting import AvailableMinimizers from easyscience.Objects.new_variable import Parameter from numpy.testing import assert_allclose -from scipp import DataGroup import easyreflectometry from easyreflectometry.data import DataSet1D