fix: default factory raised type error
This commit is contained in:
parent
f81521b014
commit
794732acee
@ -13,6 +13,7 @@ from music_kraken.objects.lint_default_factories import lint
|
||||
|
||||
lint()
|
||||
|
||||
"""
|
||||
song = Song(title="Sad Story", isrc="testTest")
|
||||
other_song = Song(title="hihi", genre="dsbm")
|
||||
|
||||
@ -29,8 +30,8 @@ print(other_song.__dict__)
|
||||
|
||||
print(song)
|
||||
print(type(song).__dict__["__annotations__"])
|
||||
"""
|
||||
|
||||
exit()
|
||||
only_smile = Artist(
|
||||
name="Only Smile",
|
||||
source_list=[Source(SourcePages.BANDCAMP, "https://onlysmile.bandcamp.com/")],
|
||||
|
@ -144,7 +144,6 @@ class Collection(Generic[T]):
|
||||
2. merge into existing object
|
||||
3. remap existing object
|
||||
"""
|
||||
self = self.__self__
|
||||
if __object.id in self._contains_ids:
|
||||
return
|
||||
|
||||
|
@ -393,23 +393,6 @@ All objects dependent on Artist
|
||||
|
||||
|
||||
class Artist(Base):
|
||||
COLLECTION_STRING_ATTRIBUTES = (
|
||||
"feature_song_collection",
|
||||
"main_album_collection",
|
||||
"label_collection",
|
||||
"source_collection"
|
||||
)
|
||||
SIMPLE_STRING_ATTRIBUTES = {
|
||||
"name": None,
|
||||
"unified_name": None,
|
||||
"country": None,
|
||||
"formed_in": ID3Timestamp(),
|
||||
"notes": FormattedText(),
|
||||
"lyrical_themes": [],
|
||||
"general_genre": "",
|
||||
"unformated_location": None,
|
||||
}
|
||||
|
||||
name: str
|
||||
unified_name: str
|
||||
country: Country
|
||||
@ -441,7 +424,7 @@ class Artist(Base):
|
||||
|
||||
"name": lambda: None,
|
||||
"unified_name": lambda: None,
|
||||
"country": Country,
|
||||
"country": lambda: None,
|
||||
"unformated_location": lambda: None,
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user