Skip to content

Commit cf39fdf

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

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

sunkit_spex/legacy/emission.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ def _split_and_integrate(*, model, photon_energies, maxfcn, rerr, eelow, eebrk,
525525
clight = const.get_constant("clight")
526526

527527
if not eelow <= eebrk <= eehigh:
528-
raise ValueError(f"Condition eelow <= eebrek <= eehigh not satisfied " f"({eelow}<={eebrk}<={eehigh}).")
528+
raise ValueError(f"Condition eelow <= eebrek <= eehigh not satisfied ({eelow}<={eebrk}<={eehigh}).")
529529

530530
# Create arrays for integral sums and error flags.
531531
intsum1 = np.zeros_like(photon_energies, dtype=np.float64)
@@ -740,7 +740,7 @@ def bremsstrahlung_thin_target(photon_energies, p, eebrk, q, eelow, eehigh, efd=
740740
flux *= fcoeff
741741

742742
return flux
743-
raise Warning("The photon energies are higher than the highest electron energy or not " "greater than zero")
743+
raise Warning("The photon energies are higher than the highest electron energy or not greater than zero")
744744

745745

746746
def bremsstrahlung_thick_target(photon_energies, p, eebrk, q, eelow, eehigh, integrator=None):
@@ -835,4 +835,4 @@ def bremsstrahlung_thick_target(photon_energies, p, eebrk, q, eelow, eehigh, int
835835

836836
return (fcoeff / decoeff) * flux
837837

838-
raise Warning("The photon energies are higher than the highest electron energy or not " "greater than zero")
838+
raise Warning("The photon energies are higher than the highest electron energy or not greater than zero")

sunkit_spex/legacy/integrate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,6 @@ def fixed_quad(func, a, b, n=5, args=(), func_kwargs={}):
154154
x, w = _cached_roots_legendre(n)
155155
x = np.real(x)
156156
if np.any(np.isinf(a)) or np.any(np.isinf(b)):
157-
raise ValueError("Gaussian quadrature is only available for " "finite limits.")
157+
raise ValueError("Gaussian quadrature is only available for finite limits.")
158158
y = (b - a).reshape(-1, 1) * (x + 1) / 2.0 + a.reshape(-1, 1)
159159
return np.squeeze((b - a).reshape(1, -1) / 2.0 * np.sum(w * func(y, *args, **func_kwargs), axis=1))

sunkit_spex/legacy/thermal.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -733,8 +733,7 @@ def _error_if_input_outside_valid_range(input_values, grid_range, param_name, pa
733733
grid_range = u.Quantity(grid_range, unit=param_unit).to_value(message_unit)
734734
param_unit = message_unit
735735
message = (
736-
f"All input {param_name} values must be within the range "
737-
f"{grid_range[0]}--{grid_range[1]} {param_unit}. "
736+
f"All input {param_name} values must be within the range {grid_range[0]}--{grid_range[1]} {param_unit}. "
738737
)
739738
raise ValueError(message)
740739

sunkit_spex/models/physical/thermal.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -737,8 +737,7 @@ def _error_if_input_outside_valid_range(input_values, grid_range, param_name, pa
737737
grid_range = u.Quantity(grid_range, unit=param_unit).to_value(message_unit)
738738
param_unit = message_unit
739739
message = (
740-
f"All input {param_name} values must be within the range "
741-
f"{grid_range[0]}--{grid_range[1]} {param_unit}. "
740+
f"All input {param_name} values must be within the range {grid_range[0]}--{grid_range[1]} {param_unit}. "
742741
)
743742
raise ValueError(message)
744743

sunkit_spex/spectrum/spectrum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def __init__(
204204
if spectral_axis is not None:
205205
# Ensure that the spectral axis is an astropy Quantity
206206
if not isinstance(spectral_axis, u.Quantity):
207-
raise ValueError("Spectral axis must be a `Quantity` or " "`SpectralAxis` object.")
207+
raise ValueError("Spectral axis must be a `Quantity` or `SpectralAxis` object.")
208208

209209
# If a spectral axis is provided as an astropy Quantity, convert it
210210
# to a SpectralAxis object.

0 commit comments

Comments
 (0)