Skip to content

Commit

Permalink
blacked the package
Browse files Browse the repository at this point in the history
  • Loading branch information
bmcfee committed Mar 26, 2024
1 parent 724a234 commit 692b84e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion mir_eval/hierarchy.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,8 @@ def validate_hier_intervals(intervals_hier):

if boundaries - new_bounds:
warnings.warn(
"Segment hierarchy is inconsistent " "at level {:d}".format(level), stacklevel=2
"Segment hierarchy is inconsistent " "at level {:d}".format(level),
stacklevel=2,
)
boundaries |= new_bounds

Expand Down
6 changes: 4 additions & 2 deletions mir_eval/separation.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ def validate(reference_sources, estimated_sources):
warnings.warn(
"reference_sources is empty, should be of size "
"(nsrc, nsample). sdr, sir, sar, and perm will all "
"be empty np.ndarrays", stacklevel=2
"be empty np.ndarrays",
stacklevel=2,
)
elif _any_source_silent(reference_sources):
raise ValueError(
Expand All @@ -106,7 +107,8 @@ def validate(reference_sources, estimated_sources):
warnings.warn(
"estimated_sources is empty, should be of size "
"(nsrc, nsample). sdr, sir, sar, and perm will all "
"be empty np.ndarrays", stacklevel=2
"be empty np.ndarrays",
stacklevel=2,
)
elif _any_source_silent(estimated_sources):
raise ValueError(
Expand Down
5 changes: 4 additions & 1 deletion mir_eval/tempo.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ def detection(reference_tempi, reference_weight, estimated_tempi, tol=0.08):
"invalid tolerance {}: must lie in the range " "[0, 1]".format(tol)
)
if tol == 0.0:
warnings.warn("A tolerance of 0.0 may not " "lead to the results you expect.", stacklevel=2)
warnings.warn(
"A tolerance of 0.0 may not " "lead to the results you expect.",
stacklevel=2,
)

hits = [False, False]

Expand Down

0 comments on commit 692b84e

Please sign in to comment.