Skip to content

Commit 86e4ecf

Browse files
authored
MAINT: flake8 E275 fixes (#572)
* flake8 E275 fixes * removed parentheses
1 parent b2840ce commit 86e4ecf

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

skypy/pipeline/scripts/skypy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ def main(args=None):
4848
logger.exception(e)
4949
raise SystemExit(2) from e
5050

51-
return(0)
51+
return 0

skypy/pipeline/tests/test_skypy.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def test_logging(capsys, tmp_path):
5858
output_filename = str(tmp_path / 'logging.fits')
5959
skypy.main([config_filename, output_filename])
6060
out, err = capsys.readouterr()
61-
assert(not err)
61+
assert not err
6262

6363
# Run again with increased verbosity and capture log. Force an exception by
6464
# not using the "--overwrite" flag when the output file already exists.
@@ -78,19 +78,19 @@ def test_logging(capsys, tmp_path):
7878
# Check all jobs appear in the log
7979
for job in list(config) + list(tables) + columns:
8080
log_string = f"[INFO] skypy.pipeline: Generating {job}"
81-
assert(log_string in err)
81+
assert log_string in err
8282

8383
# Check all functions appear in the log
8484
for f in functions:
8585
log_string = f"[INFO] skypy.pipeline: Calling {f.function.__name__}"
86-
assert(log_string in err)
86+
assert log_string in err
8787

8888
# Check cosmology appears in the log
8989
if cosmology:
90-
assert("[INFO] skypy.pipeline: Setting cosmology" in err)
90+
assert "[INFO] skypy.pipeline: Setting cosmology" in err
9191

9292
# Check writing output file is in the log
93-
assert(f"[INFO] skypy: Writing {output_filename}" in err)
93+
assert f"[INFO] skypy: Writing {output_filename}" in err
9494

9595
# Check error for existing output file is in the log
9696
try:
@@ -100,10 +100,10 @@ def test_logging(capsys, tmp_path):
100100
except ImportError:
101101
# Fallback on old error message from astropy v4.x
102102
error_string = f"[ERROR] skypy: File {output_filename!r} already exists."
103-
assert(error_string in err)
103+
assert error_string in err
104104

105105
# Run again with decreased verbosity and check the log is empty
106106
with pytest.raises(SystemExit):
107107
skypy.main([config_filename, output_filename, '-qq'])
108108
out, err = capsys.readouterr()
109-
assert(not err)
109+
assert not err

skypy/utils/photometry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def mag_ab(wavelength, spectrum, filters, *, redshift=None, coefficients=None,
131131
u = u.reshape(u.shape + (1,)*(nd_s+nd_f))
132132
m = np.ascontiguousarray(m[n])
133133
m += u*dm[n]
134-
del(dm, n, u)
134+
del dm, n, u
135135

136136
# combine spectra if asked to
137137
if coefficients is not None:

0 commit comments

Comments
 (0)