Skip to content

Commit edeb4f4

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

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

gwcs/tests/test_wcs.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1833,7 +1833,13 @@ def test_array_high_level_output():
18331833
result = values_to_high_level_objects(result, low_level_wcs=gwcs)
18341834
assert (result == coord.SpectralCoord([500, 500.1, 500.2] * u.nm)).all()
18351835

1836-
result = gwcs.pixel_to_world([0, 1, 2,])
1836+
result = gwcs.pixel_to_world(
1837+
[
1838+
0,
1839+
1,
1840+
2,
1841+
]
1842+
)
18371843
assert (result == coord.SpectralCoord([500, 500.1, 500.2] * u.nm)).all()
18381844

18391845

gwcs/wcs/_wcs.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
store_2D_coefficients,
4444
)
4545

46-
4746
__all__ = ["WCS"]
4847

4948
_ITER_INV_KWARGS = ["tolerance", "maxiter", "adaptive", "detect_divergence", "quiet"]
@@ -162,8 +161,11 @@ def __call__(
162161
*args, with_bounding_box=with_bounding_box, fill_value=fill_value, **kwargs
163162
)
164163
if with_units:
165-
warnings.warn("the 'with_units' parameter is deprecated and will be removed in the next release."
166-
"Use the shared API method 'pixel_to_world'", DeprecationWarning)
164+
warnings.warn(
165+
"the 'with_units' parameter is deprecated and will be removed in the next release."
166+
"Use the shared API method 'pixel_to_world'",
167+
DeprecationWarning,
168+
)
167169
# values are always expected to be arrays or scalars not quantities
168170
results = self._remove_units_input(results, self.output_frame)
169171
high_level = values_to_high_level_objects(*results, low_level_wcs=self)
@@ -379,8 +381,11 @@ def invert(
379381
)
380382

381383
if with_units:
382-
warnings.warn("the 'with_units' parameter is deprecated and will be removed in the next release."
383-
"Use the shared API method 'pixel_to_world'", DeprecationWarning)
384+
warnings.warn(
385+
"the 'with_units' parameter is deprecated and will be removed in the next release."
386+
"Use the shared API method 'pixel_to_world'",
387+
DeprecationWarning,
388+
)
384389
results = self._remove_units_input(results, self.input_frame)
385390
high_level = values_to_high_level_objects(
386391
*results, low_level_wcs=self.input_frame
@@ -1196,7 +1201,10 @@ def transform(
11961201
)
11971202

11981203
if with_units:
1199-
warnings.warn("the 'with_units' parameter is deprecated and will be removed in the next release.", DeprecationWarning)
1204+
warnings.warn(
1205+
"the 'with_units' parameter is deprecated and will be removed in the next release.",
1206+
DeprecationWarning,
1207+
)
12001208
results = self._remove_units_input(results, to_step.step.frame)
12011209

12021210
high_level = values_to_high_level_objects(

0 commit comments

Comments
 (0)