Skip to content

Commit

Permalink
fix: separate anime handler for now
Browse files Browse the repository at this point in the history
  • Loading branch information
dreulavelle committed Nov 9, 2024
1 parent 91e6f28 commit bca52c5
Show file tree
Hide file tree
Showing 5 changed files with 240 additions and 17 deletions.
5 changes: 1 addition & 4 deletions PTT/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
from .handlers import add_defaults
from .parse import Parser
from .anime import anime_handler

_parser = Parser()
add_defaults(_parser)


def parse_title(raw_title: str, translate_languages: bool = False, parse_anime: bool = False) -> dict:
def parse_title(raw_title: str, translate_languages: bool = False) -> dict:
"""
Parse the given input string using the initialized parser instance.
Expand All @@ -19,8 +18,6 @@ def parse_title(raw_title: str, translate_languages: bool = False, parse_anime:
If `parse_anime` is True, the anime handlers will be added to the parser instance.
This can add more time to the parsing process.
"""
if parse_anime:
anime_handler(_parser) # add anime handlers to the parser instance
return _parser.parse(raw_title, translate_languages)


Expand Down
Loading

0 comments on commit bca52c5

Please sign in to comment.