@@ -303,8 +303,14 @@ cdef class _DeviceDefaultQueueCache:
303303 self .__device_queue_map__ = dict ()
304304
305305 def get_or_create (self , key ):
306- """ Return instance of SyclQueue and indicator if cache has been modified"""
307- if isinstance (key, tuple ) and len (key) == 2 and isinstance (key[0 ], SyclContext) and isinstance (key[1 ], SyclDevice):
306+ """ Return instance of SyclQueue and indicator if cache
307+ has been modified"""
308+ if (
309+ isinstance (key, tuple )
310+ and len (key) == 2
311+ and isinstance (key[0 ], SyclContext)
312+ and isinstance (key[1 ], SyclDevice)
313+ ):
308314 ctx_dev = key
309315 q = None
310316 elif isinstance (key, SyclDevice):
@@ -325,12 +331,16 @@ cdef class _DeviceDefaultQueueCache:
325331 self .__device_queue_map__.update(dev_queue_map)
326332
327333 def __copy__ (self ):
328- cdef _DeviceDefaultQueueCache _copy = _DeviceDefaultQueueCache.__new__ (_DeviceDefaultQueueCache)
334+ cdef _DeviceDefaultQueueCache _copy = _DeviceDefaultQueueCache.__new__ (
335+ _DeviceDefaultQueueCache)
329336 _copy._update_map(self .__device_queue_map__)
330337 return _copy
331338
332339
333- _global_device_queue_cache = ContextVar(' global_device_queue_cache' , default = _DeviceDefaultQueueCache())
340+ _global_device_queue_cache = ContextVar(
341+ ' global_device_queue_cache' ,
342+ default = _DeviceDefaultQueueCache()
343+ )
334344
335345
336346cpdef object get_device_cached_queue(object key):
0 commit comments