fix: wrong rename let values duplicate, and rename file as type to fix import error

Fixes: 4c01aa7467 (refactor: convert Enum to StrEnum and reduce some duplicated code)
This commit is contained in:
Puqns67 2024-12-04 23:08:03 +08:00
parent 4c01aa7467
commit d16d14e20d
Signed by: Puqns67
GPG Key ID: 9669DF042554F536
6 changed files with 6 additions and 6 deletions

View File

@ -12,7 +12,7 @@ from rich.progress import Progress, TaskID
from rich.theme import Theme from rich.theme import Theme
from .api import NCMApi from .api import NCMApi
from .enum import LinkType from .type import LinkType
from .error import ParseLinkError, UnsupportedLinkError from .error import ParseLinkError, UnsupportedLinkError
from .lrc import Lrc from .lrc import Lrc
from .object import NCMAlbum, NCMPlaylist, NCMTrack from .object import NCMAlbum, NCMPlaylist, NCMTrack

View File

@ -6,7 +6,7 @@ from re import compile as compileRegex
from typing import Generator, Iterable, Self from typing import Generator, Iterable, Self
from .constant import CONFIG_LRC_AUTO_MERGE, CONFIG_LRC_AUTO_MERGE_OFFSET from .constant import CONFIG_LRC_AUTO_MERGE, CONFIG_LRC_AUTO_MERGE_OFFSET
from .enum import LrcMetaType, LrcType from .type import LrcMetaType, LrcType
from .error import UnsupportedPureMusicTrackError from .error import UnsupportedPureMusicTrackError
from .object import NCMLyrics from .object import NCMLyrics

View File

@ -4,7 +4,7 @@ from typing import Self
from httpx import Response from httpx import Response
from .enum import LrcType from .type import LrcType
from .error import ObjectParseError from .error import ObjectParseError
__all__ = ["NCMTrack", "NCMAlbum", "NCMPlaylist", "NCMLyrics"] __all__ = ["NCMTrack", "NCMAlbum", "NCMPlaylist", "NCMLyrics"]

View File

@ -33,7 +33,7 @@ class LrcMetaType(StrEnum):
Album = "al" Album = "al"
Author = "au" Author = "au"
Length = "length" Length = "length"
Author = "by" LrcAuthor = "by"
Offset = "offset" Offset = "offset"

View File

@ -6,7 +6,7 @@ from urllib.parse import urlparse as parseUrl
from httpx import get as getHttp from httpx import get as getHttp
from .enum import LinkType from .type import LinkType
from .error import ParseLinkError, UnsupportedLinkError from .error import ParseLinkError, UnsupportedLinkError
__all__ = ["Link", "parseLink", "safeFileName"] __all__ = ["Link", "parseLink", "safeFileName"]

View File

@ -1,7 +1,7 @@
from pathlib import Path from pathlib import Path
from unittest import TestCase from unittest import TestCase
from ncmlyrics.enum import LinkType from ncmlyrics.type import LinkType
from ncmlyrics.error import ParseLinkError, UnsupportedLinkError from ncmlyrics.error import ParseLinkError, UnsupportedLinkError
from ncmlyrics.object import NCMTrack from ncmlyrics.object import NCMTrack
from ncmlyrics.util import Link, parseLink, pickOutput, testExistTrackSource from ncmlyrics.util import Link, parseLink, pickOutput, testExistTrackSource