Skip to content

Commit c3a8b7d

Browse files
authored
Merge pull request #62 from jzuhone/ruff_black
fix ruff, black, gitignore
2 parents 3234bd6 + 7f0545d commit c3a8b7d

File tree

5 files changed

+17
-7
lines changed

5 files changed

+17
-7
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ dist
33
*.pyc
44
acis_thermal_check.egg-info
55
doc/_build
6+
.eggs
7+
.idea

acis_thermal_check/acis_obs.py

100755100644
Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,11 @@ def fetch_ocat_data(obsid_list):
7979
got_table = True
8080
try:
8181
resp = retry_call(
82-
requests.get, [urlbase], {"params": params}, tries=4, delay=1
82+
requests.get,
83+
[urlbase],
84+
{"params": params},
85+
tries=4,
86+
delay=1,
8387
)
8488
except (requests.ConnectionError, RetryError):
8589
got_table = False
@@ -95,7 +99,7 @@ def fetch_ocat_data(obsid_list):
9599
# Now we have to find all of the obsids in each sequence and then
96100
# compute the complete exposure for each sequence
97101
seq_nums = np.unique(
98-
[str(sn) for sn in tab["SEQ_NUM"].data.astype("str") if sn != " "]
102+
[str(sn) for sn in tab["SEQ_NUM"].data.astype("str") if sn != " "],
99103
)
100104
seq_num_list = ",".join(seq_nums)
101105
obsids = tab["OBSID"].data.astype("int")
@@ -104,7 +108,11 @@ def fetch_ocat_data(obsid_list):
104108
got_seq_table = True
105109
try:
106110
resp = retry_call(
107-
requests.get, [urlbase], {"params": params}, tries=4, delay=1
111+
requests.get,
112+
[urlbase],
113+
{"params": params},
114+
tries=4,
115+
delay=1,
108116
)
109117
except (requests.ConnectionError, RetryError):
110118
got_seq_table = False
@@ -197,7 +205,6 @@ def find_obsid_intervals(cmd_states, load_start):
197205
obsid_interval_list = []
198206

199207
for eachstate in cmd_states:
200-
201208
# Make sure we skip maneuver obsids explicitly
202209
if 60000 > eachstate["obsid"] >= 38001:
203210
continue
@@ -233,7 +240,6 @@ def find_obsid_intervals(cmd_states, load_start):
233240

234241
# now calculate the exposure time
235242
if xtztime is not None:
236-
237243
# Having found the startScience and stopScience, you have an
238244
# OBSID interval. Now form the element and append it to
239245
# the Master List. We add the text version of who is in

acis_thermal_check/main.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ def run(self, args, override_limits=None):
233233

234234
# Validation
235235
if not args.pred_only:
236-
237236
# Make the validation plots
238237
plots_validation = self.make_validation_plots(tlm, model_spec, args.outdir)
239238

@@ -1207,7 +1206,6 @@ def make_validation_plots(self, tlm, model_spec, outdir):
12071206
fig_id += 1
12081207

12091208
if "earthheat__fptemp" in model.comp:
1210-
12111209
fig = plt.figure(10 + fig_id, figsize=(12, 6))
12121210
fig.clf()
12131211
ticklocs, fig, ax = plot_cxctime(

acis_thermal_check/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ def config_logging(outdir, verbose):
7777
Indicate how verbose we want the logger to be.
7878
(0=quiet, 1=normal, 2=debug)
7979
"""
80+
8081
# Disable auto-configuration of root logger by adding a null handler.
8182
# This prevents other modules (e.g. Chandra.cmd_states) from generating
8283
# a streamhandler by just calling logging.info(..).

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ ignore = [
2828
"S101",
2929
"D1",
3030
"D400",
31+
"D401",
3132
"D415",
3233
"D203",
3334
"SIM105",
@@ -50,6 +51,8 @@ ignore = [
5051
"FBT003",
5152
"ARG002",
5253
"B904",
54+
"PLR2004",
55+
"PLR0915",
5356
]
5457
extend-exclude = [
5558
"doc",

0 commit comments

Comments
 (0)