@@ -89,17 +89,17 @@ def __eq__(self, __value: object) -> bool:
89
89
# __value = cast(Self, object)
90
90
if os .name == "nt" :
91
91
return (
92
- int (self .id ) == int (__value .id )
93
- and self .filename .lower () == __value .filename .lower ()
94
- and self .path .lower () == __value .path .lower ()
95
- and self .fields == __value .fields
92
+ int (self .id ) == int (__value .id ) #type: ignore
93
+ and self .filename .lower () == __value .filename .lower () #type: ignore
94
+ and self .path .lower () == __value .path .lower () #type: ignore
95
+ and self .fields == __value .fields #type: ignore
96
96
)
97
97
else :
98
98
return (
99
- int (self .id ) == int (__value .id )
100
- and self .filename == __value .filename
101
- and self .path == __value .path
102
- and self .fields == __value .fields
99
+ int (self .id ) == int (__value .id ) #type: ignore
100
+ and self .filename == __value .filename #type: ignore
101
+ and self .path == __value .path #type: ignore
102
+ and self .fields == __value .fields #type: ignore
103
103
)
104
104
105
105
def compressed_dict (self ) -> JsonEntry :
@@ -448,8 +448,9 @@ def create_library(self, path: Path) -> int:
448
448
"""
449
449
450
450
# If '.TagStudio' is included in the path, trim the path up to it.
451
- if TS_FOLDER_NAME in path :
452
- path = path .split (TS_FOLDER_NAME )[0 ]
451
+ if TS_FOLDER_NAME in str (path ):
452
+ # TODO: Native Path method instead of this casting.
453
+ path = Path (str (path ).split (TS_FOLDER_NAME )[0 ])
453
454
454
455
try :
455
456
self .clear_internal_vars ()
0 commit comments