Skip to content

Commit

Permalink
get rid of scale_factor check for min offset-based output suppression f…
Browse files Browse the repository at this point in the history
…ixes #175
  • Loading branch information
smacke committed Apr 20, 2023
1 parent 2f1dd0a commit cdad376
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions ffsubsync/ffsubsync.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,7 @@ def try_sync(
if args.output_encoding != "same":
out_subs = out_subs.set_encoding(args.output_encoding)
suppress_output_thresh = args.suppress_output_if_offset_less_than
if suppress_output_thresh is None or (
scale_step.scale_factor == 1.0
and offset_seconds >= suppress_output_thresh
):
if offset_seconds >= (suppress_output_thresh or 0):
logger.info("writing output to {}".format(srtout or "stdout"))
out_subs.write_file(srtout)
else:
Expand Down
2 changes: 1 addition & 1 deletion ffsubsync/sklearn_shim.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def _fit(self, X, y=None, **fit_params):
)
step, param = pname.split("__", 1)
fit_params_steps[step][param] = pval
for (step_idx, name, transformer) in self._iter(
for step_idx, name, transformer in self._iter(
with_final=False, filter_passthrough=False
):
if transformer is None or transformer == "passthrough":
Expand Down

0 comments on commit cdad376

Please sign in to comment.