22import uuid
33from typing import Any , Optional , Union
44
5- from .address_helper import (
6- binding_path_with_exchange_queue ,
7- exchange_address ,
8- path_address ,
9- purge_queue_address ,
10- queue_address ,
11- )
5+ from .address_helper import AddressHelper
126from .common import CommonValues , QueueType
137from .entities import (
148 BindingSpecification ,
@@ -113,7 +107,7 @@ def declare_exchange(
113107 body ["internal" ] = exchange_specification .is_internal
114108 body ["arguments" ] = exchange_specification .arguments # type: ignore
115109
116- path = exchange_address (exchange_specification .name )
110+ path = AddressHelper . exchange_address (exchange_specification .name )
117111
118112 self .request (
119113 body ,
@@ -146,7 +140,7 @@ def declare_queue(
146140 elif isinstance (queue_specification , StreamSpecification ):
147141 body = self ._declare_stream (queue_specification )
148142
149- path = queue_address (queue_specification .name )
143+ path = AddressHelper . queue_address (queue_specification .name )
150144
151145 self .request (
152146 body ,
@@ -255,7 +249,7 @@ def _declare_stream(
255249
256250 def delete_exchange (self , exchange_name : str ) -> None :
257251 logger .debug ("delete_exchange operation called" )
258- path = exchange_address (exchange_name )
252+ path = AddressHelper . exchange_address (exchange_name )
259253
260254 self .request (
261255 None ,
@@ -268,7 +262,7 @@ def delete_exchange(self, exchange_name: str) -> None:
268262
269263 def delete_queue (self , queue_name : str ) -> None :
270264 logger .debug ("delete_queue operation called" )
271- path = queue_address (queue_name )
265+ path = AddressHelper . queue_address (queue_name )
272266
273267 self .request (
274268 None ,
@@ -302,7 +296,7 @@ def bind(self, bind_specification: BindingSpecification) -> str:
302296 body ["destination_queue" ] = bind_specification .destination_queue
303297 body ["arguments" ] = {} # type: ignore
304298
305- path = path_address ()
299+ path = AddressHelper . path_address ()
306300
307301 self .request (
308302 body ,
@@ -313,7 +307,9 @@ def bind(self, bind_specification: BindingSpecification) -> str:
313307 ],
314308 )
315309
316- binding_path_with_queue = binding_path_with_exchange_queue (bind_specification )
310+ binding_path_with_queue = AddressHelper .binding_path_with_exchange_queue (
311+ bind_specification
312+ )
317313 return binding_path_with_queue
318314
319315 def unbind (self , binding_exchange_queue_path : str ) -> None :
@@ -329,7 +325,7 @@ def unbind(self, binding_exchange_queue_path: str) -> None:
329325
330326 def purge_queue (self , queue_name : str ) -> int :
331327 logger .debug ("purge_queue operation called" )
332- path = purge_queue_address (queue_name )
328+ path = AddressHelper . purge_queue_address (queue_name )
333329
334330 response = self .request (
335331 None ,
@@ -344,7 +340,7 @@ def purge_queue(self, queue_name: str) -> int:
344340
345341 def queue_info (self , queue_name : str ) -> QueueInfo :
346342 logger .debug ("queue_info operation called" )
347- path = queue_address (queue_name )
343+ path = AddressHelper . queue_address (queue_name )
348344
349345 message = self .request (
350346 None ,
0 commit comments