Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and zacharyburnett committed Nov 9, 2023
1 parent 2c66e12 commit 3374957
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 17 deletions.
14 changes: 6 additions & 8 deletions romancal/associations/tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,9 @@ def test_run_generate(self):
for ppars in self.pools:
pool = combine_pools(ppars.path, **ppars.kwargs)
asns = generate(pool, rules)
assert (
len(asns) == ppars.n_asns
), ppars.path + ": n_asns not expected {} {}".format(
len(asns), ppars.n_asns
assert len(asns) == ppars.n_asns, (
ppars.path
+ ": n_asns not expected {} {}".format(len(asns), ppars.n_asns)
)
for asn, candidates in zip(asns, ppars.candidates):
assert set(asn.candidates) == set(candidates)
Expand All @@ -77,10 +76,9 @@ def test_run_generate(self):
for member in product["members"]:
if member["exptype"] == "science":
match = file_regex.match(member["expname"])
assert (
match is not None
), ppars.path + ": No suffix match for {}".format(
member["expname"]
assert match is not None, (
ppars.path
+ ": No suffix match for {}".format(member["expname"])
)
assert (
match.groupdict()["suffix"] in ppars.valid_suffixes
Expand Down
4 changes: 1 addition & 3 deletions romancal/ramp_fitting/ramp_fit_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,7 @@ def create_image_model(input_model, image_info):
var_poisson = u.Quantity(
var_poisson, u.electron**2 / u.s**2, dtype=var_poisson.dtype
)
var_rnoise = u.Quantity(
var_rnoise, u.electron**2 / u.s**2, dtype=var_rnoise.dtype
)
var_rnoise = u.Quantity(var_rnoise, u.electron**2 / u.s**2, dtype=var_rnoise.dtype)
err = u.Quantity(err, u.electron / u.s, dtype=err.dtype)
if dq is None:
dq = np.zeros(data.shape, dtype="u4")
Expand Down
2 changes: 1 addition & 1 deletion romancal/refpix/tests/reference_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def fft_interp(
# meaningfully
chanFrameData_Flat = spfft.irfft(
fftResult * chanFrameData_Flat.size,
workers=1
workers=1,
# )
).astype(chanFrameData_Flat.dtype)
# Return read only pixels
Expand Down
4 changes: 1 addition & 3 deletions romancal/resample/gwcs_drizzle.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,7 @@ def __init__(
elif self.outcon.ndim != 3:
raise ValueError(
"Drizzle context image has wrong dimensions: \
{}".format(
product
)
{}".format(product)
)

# Check field values
Expand Down
5 changes: 3 additions & 2 deletions romancal/skymatch/skymatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,9 @@ def _apply_sky(images, sky_deltas, do_global, do_skysub, show_old):

# log sky values:
log.info(
" * Group ID={}. Sky background of "
"component images:".format(img.id)
" * Group ID={}. Sky background of " "component images:".format(
img.id
)
)

for im, old_sky, new_sky in zip(img, old_img_sky, new_img_sky):
Expand Down

0 comments on commit 3374957

Please sign in to comment.