cjcodeproj / musicscan

Python code to examine music files and extract metadata
MIT License
0 stars 0 forks source link

Possible circular type reference #45

Open cjcodeproj opened 1 week ago

cjcodeproj commented 1 week ago

MyPy is reporting this.

musicscan/data/library.py:101: error: Incompatible types in assignment (expression has type "AlbumArtist", variable has type "AlbumVariousArtists")  [assignment]
musicscan/data/library.py:101: error: Argument 1 to "AlbumArtist" has incompatible type "AbstractAlbumArtist"; expected "str"  [arg-type]

Referencing this code.

https://github.com/cjcodeproj/musicscan/blob/ac08c9f7472cd36477c1987301675c7333c5c179/src/musicscan/data/library.py#L92-L104

It could be that the art variable is already an object in the AbstractAlbumArtist class, instead of a string like expected. Will investigate.

It could also be the declaration of the self.artists types are incorrect.