@@ -383,12 +383,12 @@ def IndexPackage(self):
383383 print (item )
384384
385385 def __str__ (self ) -> str :
386- lib = self ._library .Identifier + "?" if self ._library is not None else ""
386+ lib = self ._library .Identifier if self ._library is not None else "% "
387387
388- return f"Package: { lib } .{ self .Identifier } "
388+ return f"Package: ' { lib } .{ self .Identifier } ' "
389389
390390 def __repr__ (self ) -> str :
391- lib = self ._library .Identifier + "?" if self ._library is not None else ""
391+ lib = self ._library .Identifier if self ._library is not None else "% "
392392
393393 return f"{ lib } .{ self .Identifier } "
394394
@@ -399,7 +399,7 @@ class PackageBody(SecondaryUnit, DesignUnitWithContextMixin):
399399 _declaredItems : List
400400
401401 def __init__ (self , packageSymbol : PackageSymbol , contextItems : Iterable ['Context' ] = None , declaredItems : Iterable = None , documentation : str = None ):
402- super ().__init__ (packageSymbol .Identifier , contextItems , documentation )
402+ super ().__init__ (packageSymbol .Name . Identifier , contextItems , documentation )
403403 DesignUnitWithContextMixin .__init__ (self )
404404
405405 self ._package = packageSymbol
@@ -490,14 +490,16 @@ def Architectures(self) -> Dict[str, 'Architecture']:
490490 return self ._architectures
491491
492492 def __str__ (self ) -> str :
493- lib = self ._library .Identifier + "?" if self ._library is not None else ""
493+ lib = self ._library .Identifier if self ._library is not None else "%"
494+ archs = ', ' .join (self ._architectures .keys ()) if self ._architectures else "%"
494495
495- return f"Entity: { lib } .{ self .Identifier } ({ ', ' . join ( self . _architectures . keys ()) } ) "
496+ return f"Entity: ' { lib } .{ self .Identifier } ({ archs } )' "
496497
497498 def __repr__ (self ) -> str :
498- lib = self ._library .Identifier + "?" if self ._library is not None else ""
499+ lib = self ._library .Identifier if self ._library is not None else "%"
500+ archs = ', ' .join (self ._architectures .keys ()) if self ._architectures else "%"
499501
500- return f"{ lib } .{ self .Identifier } ({ ', ' . join ( self . _architectures . keys ()) } )"
502+ return f"{ lib } .{ self .Identifier } ({ archs } )"
501503
502504
503505@export
@@ -528,14 +530,14 @@ def Library(self, library: 'Library') -> None:
528530 self ._library = library
529531
530532 def __str__ (self ) -> str :
531- lib = self ._library .Identifier + "?" if self ._library is not None else ""
532- ent = self ._entity .Identifier + "?" if self ._entity is not None else ""
533+ lib = self ._library .Identifier if self ._library is not None else "% "
534+ ent = self ._entity .Identifier if self ._entity is not None else "% "
533535
534536 return f"Architecture: { lib } .{ ent } ({ self .Identifier } )"
535537
536538 def __repr__ (self ) -> str :
537- lib = self ._library .Identifier + "?" if self ._library is not None else ""
538- ent = self ._entity .Identifier + "?" if self ._entity is not None else ""
539+ lib = self ._library .Identifier if self ._library is not None else "% "
540+ ent = self ._entity .Identifier if self ._entity is not None else "% "
539541
540542 return f"{ lib } .{ ent } ({ self .Identifier } )"
541543
@@ -590,11 +592,11 @@ def __init__(self, identifier: str, contextItems: Iterable[Context] = None, docu
590592 DesignUnitWithContextMixin .__init__ (self )
591593
592594 def __str__ (self ) -> str :
593- lib = self ._library .Identifier + "?" if self ._library is not None else ""
595+ lib = self ._library .Identifier if self ._library is not None else "% "
594596
595597 return f"Configuration: { lib } .{ self .Identifier } "
596598
597599 def __repr__ (self ) -> str :
598- lib = self ._library .Identifier + "?" if self ._library is not None else ""
600+ lib = self ._library .Identifier if self ._library is not None else "% "
599601
600602 return f"{ lib } .{ self .Identifier } "
0 commit comments