Skip to content

Commit 924c77b

Browse files
committed
Linting and mypy fixes
1 parent c5ea37e commit 924c77b

File tree

9 files changed

+27
-32
lines changed

9 files changed

+27
-32
lines changed

tests/test_fixed_point_finder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import pathlib
33

44
import numpy as np
5-
import xpart as xp # type: ignore[import-untyped]
6-
import xtrack as xt # type: ignore[import-untyped]
5+
import xpart as xp # type: ignore
6+
import xtrack as xt # type: ignore
77

88
from xnlbd.track import Henonmap
99
from xnlbd.visualise.fixed_points import FPFinder

tests/test_henonmap.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
2-
import xpart as xp # type: ignore[import-untyped]
3-
import xtrack as xt # type: ignore[import-untyped]
4-
from xobjects.test_helpers import for_all_test_contexts # type: ignore[import-untyped]
2+
import xpart as xp # type: ignore
3+
import xtrack as xt # type: ignore
4+
from xobjects.test_helpers import for_all_test_contexts # type: ignore
55

66
from xnlbd.track import Henonmap
77

tests/test_modulatedhenonmap.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import numpy as np
2-
import xpart as xp # type: ignore[import-untyped]
3-
import xtrack as xt # type: ignore[import-untyped]
4-
from scipy.special import factorial # type: ignore[import-untyped]
5-
from xobjects.test_helpers import for_all_test_contexts # type: ignore[import-untyped]
2+
import xpart as xp # type: ignore
3+
import xtrack as xt # type: ignore
4+
from scipy.special import factorial # type: ignore
5+
from xobjects.test_helpers import for_all_test_contexts # type: ignore
66

77
from xnlbd.track import Henonmap, ModulatedHenonmap
88

tests/test_normed_particles.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import pathlib
22

33
import numpy as np
4-
import xpart as xp # type: ignore[import-untyped]
5-
import xtrack as xt # type: ignore[import-untyped]
6-
from xobjects.test_helpers import for_all_test_contexts # type: ignore[import-untyped]
4+
import xpart as xp # type: ignore
5+
import xtrack as xt # type: ignore
6+
from xobjects.test_helpers import for_all_test_contexts # type: ignore
77

88
from xnlbd.tools import NormedParticles
99

xnlbd/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1+
from . import analyse, tools, track, visualise
12
from ._version import __version__
2-
3-
from . import analyse
4-
from . import tools
5-
from . import track
6-
from . import visualise

xnlbd/analyse/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from . import rdt
1+
from . import rdt

xnlbd/visualise/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
from . import orbits
2-
from . import fixed_points
1+
from . import fixed_points, orbits

xnlbd/visualise/fixed_points/topological_fixed_point_finder.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
from typing import Tuple, Union
55

66
import numpy as np
7-
import xobjects as xo # type: ignore[import-untyped]
8-
import xtrack as xt # type: ignore[import-untyped]
9-
from xtrack import Line # type: ignore[import-untyped]
10-
from xtrack.particles.particles import Particles # type: ignore[import-untyped]
11-
from xtrack.twiss import TwissTable # type: ignore[import-untyped]
7+
import xobjects as xo # type: ignore
8+
import xtrack as xt # type: ignore
9+
from xtrack import Line # type: ignore
10+
from xtrack.particles.particles import Particles # type: ignore
11+
from xtrack.twiss import TwissTable # type: ignore
1212

1313
from xnlbd.tools import NormedParticles
1414

xnlbd/visualise/orbits/orbits.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
from typing import Union
33

44
import numpy as np
5-
import scipy.constants as sc # type: ignore[import-untyped]
6-
import xpart as xp # type: ignore[import-untyped]
7-
import xtrack as xt # type: ignore[import-untyped]
8-
import xcoll as xc # type: ignore[import-untyped]
9-
from xtrack import Line # type: ignore[import-untyped]
10-
from xtrack.twiss import TwissTable # type: ignore[import-untyped]
5+
import scipy.constants as sc # type: ignore
6+
import xcoll as xc # type: ignore
7+
import xpart as xp # type: ignore
8+
import xtrack as xt # type: ignore
9+
from xtrack import Line # type: ignore
10+
from xtrack.twiss import TwissTable # type: ignore
1111

1212
from xnlbd.tools import NormedParticles
1313

@@ -589,7 +589,7 @@ def get_orbit_points(
589589
- nemitt_x: normalised emittance in horizontal plane, default `1e-6`
590590
- nemitt_y: normalised emittance in vertical plane, default `1e-6`
591591
- nemitt_z: normalised emittance in longitudinal plane, default `1`
592-
- xcoll_scattering: True if scattering should be enabled, otherwise
592+
- xcoll_scattering: True if scattering should be enabled, otherwise
593593
False, default `False`
594594
595595
Output:

0 commit comments

Comments
 (0)