Skip to content

Commit

Permalink
flake8 on github is different than my workstation
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Areeda committed Nov 29, 2023
1 parent a14f75f commit 62304e4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion omicron/cli/merge_with_gaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def valid_file(path, uint_bug):
os.remove(path)
else:
ret = True
logger.debug(f'valid_file: {ret} {path.name} ({ntrig}), took {time.time()-vf_strt:.2f}')
logger.debug(f'valid_file: {ret} {path.name} ({ntrig}), took {time.time() - vf_strt:.2f}')

Check warning on line 184 in omicron/cli/merge_with_gaps.py

View check run for this annotation

Codecov / codecov/patch

omicron/cli/merge_with_gaps.py#L184

Added line #L184 was not covered by tests
return ret


Expand Down
4 changes: 2 additions & 2 deletions omicron/cli/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ def main(args=None):
# segment, or long enough to process safely)
if truncate and abs(lastseg) < chunkdur * 2:
logger.info(
"The final segment is too short, " f'Minimum length is {int(chunkdur*2)} '
"The final segment is too short, " f'Minimum length is {int(chunkdur * 2)} '
"but ends at the limit of "
"available data, presumably this is an active segment. It "
"will be removed so that it can be processed properly later",
Expand Down Expand Up @@ -1460,7 +1460,7 @@ def main(args=None):
clean_tempfiles(tempfiles)

# and exit
logger.info(f"--- Processing complete. Elapsed: {time.time()-prog_start} seconds ----------------")
logger.info(f"--- Processing complete. Elapsed: {time.time() - prog_start} seconds ----------------")

Check warning on line 1463 in omicron/cli/process.py

View check run for this annotation

Codecov / codecov/patch

omicron/cli/process.py#L1463

Added line #L1463 was not covered by tests


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion omicron/cli/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -862,4 +862,4 @@ def print_nagios_json(code, message, outfile, tag='status', **extras):
if __name__ == "__main__":
main()
if logger:
logger.info(f'Run time: {(time.time()-prog_start):.1f} seconds')
logger.info(f'Run time: {(time.time() - prog_start):.1f} seconds')

Check warning on line 865 in omicron/cli/status.py

View check run for this annotation

Codecov / codecov/patch

omicron/cli/status.py#L865

Added line #L865 was not covered by tests
2 changes: 1 addition & 1 deletion omicron/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def find_frames(obs, frametype, start, end, on_gaps='warn', **kwargs):
if on_gaps != 'ignore':
seglist = SegmentList(map(file_segment, cache)).coalesce()
missing = (SegmentList([Segment(start, end)]) - seglist).coalesce()
msg = "Missing frames:\n{}".format('\n'.join(map(lambda s: f'[{s[0]}, {s[1]}) -> {s[1]-s[0]}s', missing)))
msg = "Missing frames:\n{}".format('\n'.join(map(lambda s: f'[{s[0]}, {s[1]}) -> {s[1] - s[0]}s', missing)))

Check warning on line 193 in omicron/data.py

View check run for this annotation

Codecov / codecov/patch

omicron/data.py#L193

Added line #L193 was not covered by tests
if missing and on_gaps == 'warn':
warnings.warn(msg)
elif missing:
Expand Down

0 comments on commit 62304e4

Please sign in to comment.