@@ -268,7 +268,6 @@ def from_raw(cls, claim, value, qualifiers, lazylabel):
268268 label = lazylabel .create (id ),
269269 description = None ,
270270 aliases = [],
271- instanceof = [],
272271 claims = []
273272 )
274273 else :
@@ -304,7 +303,6 @@ def from_raw(cls, claim, value, qualifiers, lazylabel):
304303 label = lazylabel .create (pid ),
305304 description = None ,
306305 aliases = [],
307- instanceof = [],
308306 claims = []
309307 ),
310308 claim = qualifier ,
@@ -483,7 +481,6 @@ class WikidataEntity:
483481 label : str | None
484482 description : str | None
485483 aliases : list [str ]
486- instanceof : list ["WikidataEntity" ]
487484 claims : list [WikidataClaim ]
488485
489486 @classmethod
@@ -513,7 +510,6 @@ def from_id(cls, id: str, lang: str = 'en', external_ids: bool = True):
513510 label = lazylabel .create (pid ),
514511 description = None ,
515512 aliases = [],
516- instanceof = [],
517513 claims = []
518514 ),
519515 claim = claim ,
@@ -522,17 +518,11 @@ def from_id(cls, id: str, lang: str = 'en', external_ids: bool = True):
522518 ) for pid , claim in entity_dict .get ('claims' , {}).items ()
523519 ]
524520
525- instanceofclaim = [c for c in claims if c .property .id == 'P31' ]
526- instanceof = []
527- if len (instanceofclaim ) > 0 :
528- instanceof = [val .value for val in instanceofclaim [0 ].values ]
529-
530521 entity = cls (
531522 id = id ,
532523 label = label ,
533524 description = description ,
534525 aliases = aliases ,
535- instanceof = instanceof ,
536526 claims = claims
537527 )
538528
@@ -545,8 +535,6 @@ def __str__(self):
545535 label_str = str (self .label )
546536 string = label_str
547537
548- if self .instanceof :
549- string += f" ({ ', ' .join (map (str , self .instanceof ))} )"
550538 if self .description :
551539 string += f", { self .description } "
552540 if self .aliases :
0 commit comments