File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5757# Debugging handlers
5858def debug_fsm (event : "Event" ) -> None :
5959 """Debugging handler for the FSM."""
60-
60+
6161 LOGGER .debug (
6262 "{}: {} + {} -> {} -> {}" .format ( # noqa: UP032
6363 event .assoc .mode [0 ].upper (),
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ def _check_async_ops(self) -> AsynchronousOperationsWindowNegotiation | None:
7878 default values for the number of operations invoked/performed
7979 (1, 1).
8080 """
81- setattr (self .assoc , "abort" , self .assoc ._abort_nonblocking ) # noqa: B010
81+ setattr (self .assoc , "abort" , self .assoc ._abort_nonblocking ) # noqa: B010
8282
8383 try :
8484 # Response is always ignored as async ops is not supported
@@ -112,7 +112,7 @@ def _check_sop_class_common_extended(
112112 The {SOP Class UID : SOPClassCommonExtendedNegotiation} items for
113113 the accepted SOP Class Common Extended negotiation items.
114114 """
115- setattr (self .assoc , "abort" , self .assoc ._abort_nonblocking ) # noqa: B010
115+ setattr (self .assoc , "abort" , self .assoc ._abort_nonblocking ) # noqa: B010
116116
117117 try :
118118 rsp = evt .trigger (
@@ -153,7 +153,7 @@ def _check_sop_class_extended(self) -> list[SOPClassExtendedNegotiation]:
153153 list of pdu_primitives.SOPClassExtendedNegotiation
154154 The SOP Class Extended Negotiation items to be sent in response
155155 """
156- setattr (self .assoc , "abort" , self .assoc ._abort_nonblocking ) # noqa: B010
156+ setattr (self .assoc , "abort" , self .assoc ._abort_nonblocking ) # noqa: B010
157157
158158 try :
159159 user_response = evt .trigger (
Original file line number Diff line number Diff line change @@ -1474,15 +1474,21 @@ def __str__(self) -> str:
14741474 s .append ("\t None" )
14751475 for context in self .requested_contexts :
14761476 s .append (f"\t { cast (UID , context .abstract_syntax ).name } " )
1477- s .extend (f"\t \t { transfer_syntax .name } " for transfer_syntax in context .transfer_syntax )
1477+ s .extend (
1478+ f"\t \t { transfer_syntax .name } "
1479+ for transfer_syntax in context .transfer_syntax
1480+ )
14781481
14791482 s .append ("" )
14801483 s .append (" Supported Presentation Contexts:" )
14811484 if not self .supported_contexts :
14821485 s .append ("\t None" )
14831486 for context in self .supported_contexts :
14841487 s .append (f"\t { cast (UID , context .abstract_syntax ).name } " )
1485- s .extend (f"\t \t { transfer_syntax .name } " for transfer_syntax in context .transfer_syntax )
1488+ s .extend (
1489+ f"\t \t { transfer_syntax .name } "
1490+ for transfer_syntax in context .transfer_syntax
1491+ )
14861492
14871493 s .append ("" )
14881494 s .append (f" ACSE timeout: { self .acse_timeout } s" )
@@ -1503,8 +1509,11 @@ def __str__(self) -> str:
15031509 f"/{ self .maximum_associations } "
15041510 )
15051511
1506- s .extend (f"\t Peer: { assoc .remote ['ae_title' ]} on "
1507- f"{ assoc .remote ['address' ]} :{ assoc .remote ['port' ]} " for assoc in self .active_associations )
1512+ s .extend (
1513+ f"\t Peer: { assoc .remote ['ae_title' ]} on "
1514+ f"{ assoc .remote ['address' ]} :{ assoc .remote ['port' ]} "
1515+ for assoc in self .active_associations
1516+ )
15081517
15091518 return "\n " .join (s )
15101519
Original file line number Diff line number Diff line change @@ -3814,7 +3814,9 @@ def extended_negotiation(self) -> list[_UI]:
38143814
38153815 return items
38163816
3817- items .extend (item for item in self .user_information if type (item ) in self ._ext_neg )
3817+ items .extend (
3818+ item for item in self .user_information if type (item ) in self ._ext_neg
3819+ )
38183820
38193821 return items
38203822
Original file line number Diff line number Diff line change @@ -71,7 +71,9 @@ def do_action(self, event: str) -> None:
7171 """
7272 # Check (event + state) is valid
7373 if (event , self .current_state ) not in TRANSITION_TABLE :
74- msg = f"Invalid event '{ event } ' for the current state '{ self .current_state } '"
74+ msg = (
75+ f"Invalid event '{ event } ' for the current state '{ self .current_state } '"
76+ )
7577 LOGGER .error (msg )
7678 raise InvalidEventError (msg )
7779
Original file line number Diff line number Diff line change @@ -2896,7 +2896,10 @@ def __str__(self) -> str:
28962896 f"{ self .related_general_sop_class_identification_length } bytes" ,
28972897 " Related general SOP class ID(s):" ,
28982898 ]
2899- s .extend (f" ={ uid } ({ uid .name } )" for uid in self .related_general_sop_class_identification )
2899+ s .extend (
2900+ f" ={ uid } ({ uid .name } )"
2901+ for uid in self .related_general_sop_class_identification
2902+ )
29002903
29012904 s .append ("" )
29022905
@@ -3163,9 +3166,7 @@ def __str__(self) -> str:
31633166 f" Primary field: { self .primary_field !r} " ,
31643167 ]
31653168 if self .user_identity_type == 0x02 :
3166- s .append (
3167- f" Secondary field length: { self .secondary_field_length } bytes"
3168- )
3169+ s .append (f" Secondary field length: { self .secondary_field_length } bytes" )
31693170 s .append (f" Secondary field: { self .secondary_field !r} \n " )
31703171 else :
31713172 s .append (" Secondary field length: (not used)" )
@@ -3442,7 +3443,7 @@ def message_control_header_byte(self) -> str:
34423443
34433444 def __str__ (self ) -> str :
34443445 """Return a string representation of the Item."""
3445- pdv_samples = ' ' .join (
3446+ pdv_samples = " " .join (
34463447 f"0x{ b :02X} " for b in self .presentation_data_value [:10 ] # type: ignore
34473448 )
34483449 s = [
You can’t perform that action at this time.
0 commit comments