mirror of
https://github.com/morpheus65535/bazarr
synced 2025-01-03 05:25:28 +00:00
Fixed SyntaxWarning with Python 3.12. #2462
This commit is contained in:
parent
369b2c7343
commit
fd190aad14
5 changed files with 9 additions and 9 deletions
|
@ -50,7 +50,7 @@ def default_xattr(fn):
|
||||||
XATTR_MAP = {
|
XATTR_MAP = {
|
||||||
"default": (
|
"default": (
|
||||||
default_xattr,
|
default_xattr,
|
||||||
lambda result: re.search('(?um)(net\.filebot\.filename(?=="|: )[=:" ]+|Attribute.+:\s)([^"\n\r\0]+)',
|
lambda result: re.search(r'(?um)(net\.filebot\.filename(?=="|: )[=:" ]+|Attribute.+:\s)([^"\n\r\0]+)',
|
||||||
result).group(2)
|
result).group(2)
|
||||||
),
|
),
|
||||||
# "darwin": (
|
# "darwin": (
|
||||||
|
@ -60,7 +60,7 @@ XATTR_MAP = {
|
||||||
# ),
|
# ),
|
||||||
"darwin": (
|
"darwin": (
|
||||||
lambda fn: ["filebot", "-script", "fn:xattr", fn],
|
lambda fn: ["filebot", "-script", "fn:xattr", fn],
|
||||||
lambda result: re.search('(?um)(net\.filebot\.filename(?=="|: )[=:" ]+|Attribute.+:\s)([^"\n\r\0]+)',
|
lambda result: re.search(r'(?um)(net\.filebot\.filename(?=="|: )[=:" ]+|Attribute.+:\s)([^"\n\r\0]+)',
|
||||||
result).group(2)
|
result).group(2)
|
||||||
),
|
),
|
||||||
"win32": (
|
"win32": (
|
||||||
|
|
|
@ -6,7 +6,7 @@ from stevedore import ExtensionManager
|
||||||
|
|
||||||
|
|
||||||
class RegistrableExtensionManager(ExtensionManager):
|
class RegistrableExtensionManager(ExtensionManager):
|
||||||
""":class:~stevedore.extensions.ExtensionManager` with support for registration.
|
r""":class:~stevedore.extensions.ExtensionManager` with support for registration.
|
||||||
|
|
||||||
It allows loading of internal extensions without setup and registering/unregistering additional extensions.
|
It allows loading of internal extensions without setup and registering/unregistering additional extensions.
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
"""
|
r"""
|
||||||
Refiners enrich a :class:`~subliminal.video.Video` object by adding information to it.
|
Refiners enrich a :class:`~subliminal.video.Video` object by adding information to it.
|
||||||
|
|
||||||
A refiner is a simple function:
|
A refiner is a simple function:
|
||||||
|
|
|
@ -115,7 +115,7 @@ class Video(object):
|
||||||
|
|
||||||
|
|
||||||
class Episode(Video):
|
class Episode(Video):
|
||||||
"""Episode :class:`Video`.
|
r"""Episode :class:`Video`.
|
||||||
|
|
||||||
:param str series: series of the episode.
|
:param str series: series of the episode.
|
||||||
:param int season: season number of the episode.
|
:param int season: season number of the episode.
|
||||||
|
@ -202,7 +202,7 @@ class Episode(Video):
|
||||||
|
|
||||||
|
|
||||||
class Movie(Video):
|
class Movie(Video):
|
||||||
"""Movie :class:`Video`.
|
r"""Movie :class:`Video`.
|
||||||
|
|
||||||
:param str title: title of the movie.
|
:param str title: title of the movie.
|
||||||
:param int year: year of the movie.
|
:param int year: year of the movie.
|
||||||
|
|
|
@ -1057,7 +1057,7 @@ def list_supported_video_types(pool_class, **kwargs):
|
||||||
|
|
||||||
|
|
||||||
def download_subtitles(subtitles, pool_class=ProviderPool, **kwargs):
|
def download_subtitles(subtitles, pool_class=ProviderPool, **kwargs):
|
||||||
"""Download :attr:`~subliminal.subtitle.Subtitle.content` of `subtitles`.
|
r"""Download :attr:`~subliminal.subtitle.Subtitle.content` of `subtitles`.
|
||||||
|
|
||||||
:param subtitles: subtitles to download.
|
:param subtitles: subtitles to download.
|
||||||
:type subtitles: list of :class:`~subliminal.subtitle.Subtitle`
|
:type subtitles: list of :class:`~subliminal.subtitle.Subtitle`
|
||||||
|
@ -1074,7 +1074,7 @@ def download_subtitles(subtitles, pool_class=ProviderPool, **kwargs):
|
||||||
|
|
||||||
def download_best_subtitles(videos, languages, min_score=0, hearing_impaired=False, only_one=False, compute_score=None,
|
def download_best_subtitles(videos, languages, min_score=0, hearing_impaired=False, only_one=False, compute_score=None,
|
||||||
pool_class=ProviderPool, throttle_time=0, **kwargs):
|
pool_class=ProviderPool, throttle_time=0, **kwargs):
|
||||||
"""List and download the best matching subtitles.
|
r"""List and download the best matching subtitles.
|
||||||
|
|
||||||
The `videos` must pass the `languages` and `undefined` (`only_one`) checks of :func:`check_video`.
|
The `videos` must pass the `languages` and `undefined` (`only_one`) checks of :func:`check_video`.
|
||||||
|
|
||||||
|
@ -1245,7 +1245,7 @@ def save_subtitles(file_path, subtitles, single=False, directory=None, chmod=Non
|
||||||
|
|
||||||
|
|
||||||
def refine(video, episode_refiners=None, movie_refiners=None, **kwargs):
|
def refine(video, episode_refiners=None, movie_refiners=None, **kwargs):
|
||||||
"""Refine a video using :ref:`refiners`.
|
r"""Refine a video using :ref:`refiners`.
|
||||||
|
|
||||||
patch: add traceback logging
|
patch: add traceback logging
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue