From ae8b8293f0d58665fe3d20a7f8cf408ea8e8fc58 Mon Sep 17 00:00:00 2001 From: JingWeiLyu Date: Sun, 22 Aug 2021 16:14:10 +0800 Subject: [PATCH] fix bug of srtfile parameter --- pyproject.toml | 2 +- subtitle_analyzer/__init__.py | 2 +- subtitle_analyzer/phrase_ass_writer.py | 6 +++--- tests/test_subtitle_analyzer.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 10c8368..d9a2d8b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "subtitle-analyzer" -version = "0.1.13" +version = "0.1.14" description = "" authors = ["Phoenix Grey "] repository = "https://github.com/qishe-nlp/subtitle-analyzer" diff --git a/subtitle_analyzer/__init__.py b/subtitle_analyzer/__init__.py index ef426c8..0879c07 100644 --- a/subtitle_analyzer/__init__.py +++ b/subtitle_analyzer/__init__.py @@ -97,7 +97,7 @@ def subtitle_phrase(srtfile, lang, assfile, google): """ -__version__ = '0.1.13' +__version__ = '0.1.14' from .vocab_analyzer import VocabAnalyzer from .vocab_ass_writer import VocabASSWriter diff --git a/subtitle_analyzer/phrase_ass_writer.py b/subtitle_analyzer/phrase_ass_writer.py index 5d64bac..2af0b97 100644 --- a/subtitle_analyzer/phrase_ass_writer.py +++ b/subtitle_analyzer/phrase_ass_writer.py @@ -19,11 +19,11 @@ class PhraseASSWriter: _local_dir = os.path.dirname(__file__) _srtfile = os.path.join(_local_dir, 'empty.srt') - def __init__(self, srtfile, cn_srtfile=None): - """Initialize subtitle object from srtfile + def __init__(self, cn_srtfile=None): + """Initialize subtitle object from empty srtfile Args: - srtfile (str): subtitle filename + cn_srtfile (str): Chineses subtitle filename """ self._subs = pysubs2.load(self.__class__._srtfile) diff --git a/tests/test_subtitle_analyzer.py b/tests/test_subtitle_analyzer.py index c75660c..2beb8be 100644 --- a/tests/test_subtitle_analyzer.py +++ b/tests/test_subtitle_analyzer.py @@ -2,4 +2,4 @@ def test_version(): - assert __version__ == '0.1.13' + assert __version__ == '0.1.14'