Skip to content

Commit

Permalink
Fix deprecations and mypy --strict errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmetsait committed Dec 15, 2024
1 parent d0d2741 commit cfbc2bd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions ffmpeg_normalize/_cmd_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import subprocess
from platform import system
from shutil import which
from typing import Iterator
from typing import Iterator, Any

from ffmpeg_progress_yield import FfmpegProgress

Expand Down Expand Up @@ -128,12 +128,12 @@ def get_output(self) -> str:
return self.output


def dict_to_filter_opts(opts: dict[str, object]) -> str:
def dict_to_filter_opts(opts: dict[str, Any]) -> str:
"""
Convert a dictionary to a ffmpeg filter option string
Args:
opts (dict[str, object]): Dictionary of options
opts (dict[str, Any]): Dictionary of options
Returns:
str: Filter option string
Expand Down
2 changes: 1 addition & 1 deletion ffmpeg_normalize/_media_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def _get_audio_filter_cmd(self) -> tuple[str, list[str]]:
skip_normalization = True

if skip_normalization:
_logger.warn(
_logger.warning(
f"Stream {audio_stream.stream_id} had measured input loudness lower than target, skipping normalization."
)
normalization_filter = "acopy"
Expand Down
2 changes: 1 addition & 1 deletion ffmpeg_normalize/_streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def get_stats(self) -> LoudnessStatisticsWithMetadata:
}
return stats

def set_second_pass_stats(self, stats: EbuLoudnessStatistics):
def set_second_pass_stats(self, stats: EbuLoudnessStatistics) -> None:
"""
Set the EBU loudness statistics for the second pass.
Expand Down

0 comments on commit cfbc2bd

Please sign in to comment.