@@ -978,13 +978,13 @@ def _build_outline_item(self, node: DictionaryObject) -> Optional[Destination]:
978
978
title = ""
979
979
980
980
if "/A" in node :
981
- # Action, PDFv1 .7 Section 12.6 (only type GoTo supported)
981
+ # Action, PDF 1 .7 and PDF 2.0 § 12.6 (only type GoTo supported)
982
982
action = cast (DictionaryObject , node ["/A" ])
983
983
action_type = cast (NameObject , action [GoToActionArguments .S ])
984
984
if action_type == "/GoTo" :
985
985
dest = action [GoToActionArguments .D ]
986
986
elif "/Dest" in node :
987
- # Destination, PDFv1 .7 Section 12.3.2
987
+ # Destination, PDF 1 .7 and PDF 2.0 § 12.3.2
988
988
dest = node ["/Dest" ]
989
989
# if array was referenced in another object, will be a dict w/ key "/D"
990
990
if isinstance (dest , DictionaryObject ) and "/D" in dest :
@@ -994,7 +994,7 @@ def _build_outline_item(self, node: DictionaryObject) -> Optional[Destination]:
994
994
outline_item = self ._build_destination (title , dest )
995
995
elif isinstance (dest , str ):
996
996
# named destination, addresses NameObject Issue #193
997
- # TODO : keep named destination instead of replacing it ?
997
+ # TODO: Keep named destination instead of replacing it?
998
998
try :
999
999
outline_item = self ._build_destination (
1000
1000
title , self ._named_destinations [dest ].dest_array
@@ -1028,7 +1028,7 @@ def _build_outline_item(self, node: DictionaryObject) -> Optional[Destination]:
1028
1028
# absolute value = num. visible children
1029
1029
# with positive = open/unfolded, negative = closed/folded
1030
1030
outline_item [NameObject ("/Count" )] = node ["/Count" ]
1031
- # if count is 0 we will consider it as open ( in order to have always an is_open to simplify
1031
+ # if count is 0 we will consider it as open (to have available is_open)
1032
1032
outline_item [NameObject ("/%is_open%" )] = BooleanObject (
1033
1033
node .get ("/Count" , 0 ) >= 0
1034
1034
)
@@ -1428,8 +1428,8 @@ def _repr_mimebundle_(
1428
1428
1429
1429
1430
1430
class LazyDict (Mapping [Any , Any ]):
1431
- def __init__ (self , * args : Any , ** kw : Any ) -> None :
1432
- self ._raw_dict = dict (* args , ** kw )
1431
+ def __init__ (self , * args : Any , ** kwargs : Any ) -> None :
1432
+ self ._raw_dict = dict (* args , ** kwargs )
1433
1433
1434
1434
def __getitem__ (self , key : str ) -> Any :
1435
1435
func , arg = self ._raw_dict .__getitem__ (key )
0 commit comments