@@ -180,7 +180,7 @@ def _parse_objects(self, graph: rdflib.Graph) -> Dict[str, SBOLObject]:
180180 # 6.11 of the spec) and we instantiate it specially.
181181 #
182182 identity_types : Dict [str , List [str ]] = collections .defaultdict (list )
183- for s , p , o in graph .triples ((None , rdflib .RDF .type , None )):
183+ for s , _ , o in graph .triples ((None , rdflib .RDF .type , None )):
184184 str_o = str (o )
185185 str_s = str (s )
186186 identity_types [str_s ].append (str_o )
@@ -238,7 +238,7 @@ def _clean_up_singletons(objects: Dict[str, SBOLObject]):
238238 # in multiple values in a singleton property. Only the first value
239239 # is used, so the value read from file is ignored.
240240 for _ , obj in objects .items ():
241- for name , attr in obj .__dict__ .items ():
241+ for _ , attr in obj .__dict__ .items ():
242242 if isinstance (attr , SingletonProperty ):
243243 prop_uri = attr .property_uri
244244 store = attr ._storage ()
@@ -472,7 +472,7 @@ def write(self, fpath: Union[Path, str], file_format: str = None) -> None:
472472 file_format = self ._guess_format (_fpath )
473473 if file_format is None :
474474 raise ValueError ('Unable to determine file format' )
475- with open (_fpath , 'w' ) as outfile :
475+ with open (_fpath , 'w' , encoding = 'utf-8' ) as outfile :
476476 outfile .write (self .write_string (file_format ))
477477
478478 def graph (self ) -> rdflib .Graph :
0 commit comments