Skip to content

Commit 686bc7f

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent cd44aff commit 686bc7f

File tree

9 files changed

+0
-17
lines changed

9 files changed

+0
-17
lines changed

src/pysimulators/datatypes.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,7 @@ def __new__(
109109
ndmin=0,
110110
comm=None,
111111
):
112-
113112
if isinstance(data, str):
114-
115113
if comm is None:
116114
comm = MPI.COMM_SELF
117115

@@ -641,7 +639,6 @@ def __new__(
641639
ndmin=0,
642640
comm=None,
643641
):
644-
645642
# get a new Map instance (or a subclass if subok is True)
646643
result = FitsArray.__new__(
647644
cls,
@@ -660,7 +657,6 @@ def __new__(
660657
result = result.view(cls)
661658

662659
if isinstance(data, str):
663-
664660
if comm is None:
665661
comm = MPI.COMM_SELF
666662

@@ -1022,7 +1018,6 @@ def __new__(
10221018
ndmin=0,
10231019
comm=None,
10241020
):
1025-
10261021
# get a new Tod instance (or a subclass if subok is True)
10271022
result = FitsArray.__new__(
10281023
cls,
@@ -1045,7 +1040,6 @@ def __new__(
10451040
mask = None
10461041

10471042
if mask is None and isinstance(data, str):
1048-
10491043
if comm is None:
10501044
comm = MPI.COMM_SELF
10511045

src/pysimulators/interfaces/madmap1.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ def __init__(
4343
commin=MPI.COMM_WORLD,
4444
commout=MPI.COMM_WORLD,
4545
):
46-
4746
if commin.size > 1 or commout.size > 1:
4847
raise NotImplementedError(
4948
'The parallelisation of the TOD is not implemented'

src/pysimulators/operators.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ def block_diagonal(*partition_args, **keywords):
120120
def func(cls):
121121
@functools.wraps(cls.__init__)
122122
def partition_init(self, *args, **keywords):
123-
124123
# get number of blocks through the partitionin keyword
125124
n1 = 0
126125
partitionin = None
@@ -611,7 +610,6 @@ class ProjectionBaseOperator(Operator):
611610
def __init__(
612611
self, units=None, derived_units=None, attrin={}, attrout={}, **keywords
613612
):
614-
615613
if units is None:
616614
units = ('', '')
617615
if derived_units is None:

src/pysimulators/quantities.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ def __new__(
253253
subok=False,
254254
ndmin=0,
255255
):
256-
257256
data = np.asanyarray(data)
258257
if dtype is None and data.dtype.kind == 'i':
259258
dtype = float
@@ -685,7 +684,6 @@ def SI(self):
685684
ffast = Quantity(1.0, '')
686685
fslow = Quantity(1.0, '')
687686
for key, val in self._unit.items():
688-
689687
# check if the unit is a local derived unit
690688
newfactor, broadcast = _check_du(self, key, val, self.derived_units)
691689

tests/packedtables/test_packedtables.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ def test_ndim1(shape):
4242
],
4343
)
4444
def test_ndim2(shape, ndim):
45-
4645
layout = PackedTable(shape, ndim=ndim)
4746
assert_equal(layout.ndim, ndim)
4847
assert_equal(layout.shape, shape)
@@ -463,7 +462,6 @@ def test_ordering3():
463462
],
464463
)
465464
def test_ordering4(ordering, expected):
466-
467465
layout = PackedTable((2, 3), ordering=ordering)
468466
assert_equal(layout._index, expected)
469467

tests/packedtables/test_samplings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
@pytest.mark.parametrize('fmt', [lambda ra: ((ra,), {}), lambda ra: ((), {'ra': ra})])
1111
@pytest.mark.parametrize('ra', [1.0, (1.0,), [1.0], np.ones(10), np.ones((2, 3))])
1212
def test_coords_ra(fmt, ra):
13-
1413
args, keywords = fmt(ra)
1514
if len(args) > 0 and isscalarlike(args[0]):
1615
p = SamplingEquatorial(*args, **keywords)

tests/test_datatypes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ def test_input3(type_):
112112
],
113113
)
114114
def test_view(type_, attrs):
115-
116115
data = np.ones((2, 4)).view(type_)
117116
for attr in attrs:
118117
assert hasattr(data, attr)

tests/test_healpy.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
)
3333
@pytest.mark.parametrize('nest', [False, True])
3434
def test_cartesian_healpix(vec, shape, nest):
35-
3635
c2h = Cartesian2HealpixOperator(NSIDE, nest=nest)
3736
h2c = Healpix2CartesianOperator(NSIDE, nest=nest)
3837
a = h2c(c2h(vec))

tests/test_operators.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ def ref_blackbody(w, T):
193193

194194

195195
def test_blackbody_scalar():
196-
197196
w = np.arange(90.0, 111) * 1e-6
198197
T = 15.0
199198
flux = ref_blackbody(w, T) / ref_blackbody(100e-6, T)

0 commit comments

Comments
 (0)