Skip to content

Commit e3b89a4

Browse files
pre-commit-ci-lite[bot]klytje
authored andcommitted
[pre-commit.ci lite] apply automatic fixes for ruff linting errors
1 parent 9acc689 commit e3b89a4

File tree

12 files changed

+35
-10
lines changed

12 files changed

+35
-10
lines changed

src/sas/sascalc/shape2sas/Models.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,21 @@
33
import numpy as np
44

55
from sas.sascalc.shape2sas.HelperFunctions import Qsampling, euler_rotation_matrix
6-
from sas.sascalc.shape2sas.models import \
7-
Cube, Cuboid, Cylinder, CylinderRing, Disc, DiscRing, Ellipsoid, \
8-
EllipticalCylinder, HollowCube, HollowSphere, Sphere, SuperEllipsoid
9-
from sas.sascalc.shape2sas.Typing import Vectors, Vector3D, Vector4D
6+
from sas.sascalc.shape2sas.models import (
7+
Cube,
8+
Cuboid,
9+
Cylinder,
10+
CylinderRing,
11+
Disc,
12+
DiscRing,
13+
Ellipsoid,
14+
EllipticalCylinder,
15+
HollowCube,
16+
HollowSphere,
17+
Sphere,
18+
SuperEllipsoid,
19+
)
20+
from sas.sascalc.shape2sas.Typing import Vector3D, Vector4D, Vectors
1021

1122

1223
@dataclass
@@ -72,7 +83,7 @@ def __init__(self, matrix: np.ndarray, center_mass: np.ndarray):
7283

7384
def transform(coords: np.ndarray[Vector3D], translate: Translation = np.array([0, 0, 0]), rotate: Rotation = Rotation(np.eye(3), np.array([0, 0, 0]))):
7485
"""Transform a set of coordinates by a rotation R and translation T"""
75-
if isinstance(rotate, np.ndarray):
86+
if isinstance(rotate, np.ndarray):
7687
rotate = Rotation(rotate, np.array([0, 0, 0]))
7788
assert coords.shape[0] == 3
7889
assert translate.shape == (3,)

src/sas/sascalc/shape2sas/Shape2SAS.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,16 @@
77

88
from sas.sascalc.shape2sas.ExperimentalScattering import SimulateScattering, getSimulatedScattering
99
from sas.sascalc.shape2sas.HelperFunctions import generate_pdb, plot_2D, plot_results
10-
from sas.sascalc.shape2sas.Models import Qsampling, ModelProfile, SimulationParameters, getPointDistribution
10+
from sas.sascalc.shape2sas.Models import ModelProfile, Qsampling, SimulationParameters, getPointDistribution
1111
from sas.sascalc.shape2sas.StructureFactor import StructureFactor
12-
from sas.sascalc.shape2sas.TheoreticalScattering import \
13-
TheoreticalScatteringCalculation, ModelSystem, ITheoretical, WeightedPairDistribution, \
14-
getTheoreticalScattering, getTheoreticalHistogram
12+
from sas.sascalc.shape2sas.TheoreticalScattering import (
13+
ITheoretical,
14+
ModelSystem,
15+
TheoreticalScatteringCalculation,
16+
WeightedPairDistribution,
17+
getTheoreticalHistogram,
18+
getTheoreticalScattering,
19+
)
1520

1621
################################ Shape2SAS batch version ################################
1722
if __name__ == "__main__":

src/sas/sascalc/shape2sas/StructureFactor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
import numpy as np
33

4-
from sas.sascalc.shape2sas.structure_factors import HardSphereStructure, Aggregation, NoStructure
4+
from sas.sascalc.shape2sas.structure_factors import Aggregation, HardSphereStructure, NoStructure
55

66

77
class StructureFactor:

src/sas/sascalc/shape2sas/models/Cube.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import numpy as np
2+
23
from sas.sascalc.shape2sas.Typing import Vector3D
34

45

src/sas/sascalc/shape2sas/models/Cuboid.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import numpy as np
2+
23
from sas.sascalc.shape2sas.Typing import Vector3D
34

45

src/sas/sascalc/shape2sas/models/Cylinder.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import numpy as np
2+
23
from sas.sascalc.shape2sas.Typing import Vector3D
34

45

src/sas/sascalc/shape2sas/models/CylinderRing.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import numpy as np
2+
23
from sas.sascalc.shape2sas.Typing import Vector3D
34

45

src/sas/sascalc/shape2sas/models/Ellipsoid.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import numpy as np
2+
23
from sas.sascalc.shape2sas.Typing import Vector3D
34

45

src/sas/sascalc/shape2sas/models/EllipticalCylinder.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import numpy as np
2+
23
from sas.sascalc.shape2sas.Typing import Vector3D
34

45

src/sas/sascalc/shape2sas/models/HollowCube.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import numpy as np
2+
23
from sas.sascalc.shape2sas.Typing import Vector3D
34

45

0 commit comments

Comments
 (0)