Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix new lint from Python 3.12 #175

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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 @@ -854,7 +854,7 @@
# 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 @@ -1447,7 +1447,7 @@
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 1450 in omicron/cli/process.py

View check run for this annotation

Codecov / codecov/patch

omicron/cli/process.py#L1450

Added line #L1450 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 @@
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 @@
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
Loading