diff --git a/dpctl/_sycl_queue.pyx b/dpctl/_sycl_queue.pyx index b0b8336788..06342889b0 100644 --- a/dpctl/_sycl_queue.pyx +++ b/dpctl/_sycl_queue.pyx @@ -488,9 +488,8 @@ cdef DPCTLSyclEventRef _memcpy_impl( src_is_buf = True else: raise TypeError( - "Parameter `src` should have either type " - "`dpctl.memory._Memory` or a type that " - "supports Python buffer protocol" + "Parameter `src` should have either type `dpctl.memory._Memory` " + "or a type that supports Python buffer protocol" ) if isinstance(dst, _Memory): @@ -508,9 +507,8 @@ cdef DPCTLSyclEventRef _memcpy_impl( dst_is_buf = True else: raise TypeError( - "Parameter `dst` should have either type " - "`dpctl.memory._Memory` or a type that " - "supports Python buffer protocol" + "Parameter `dst` should have either type `dpctl.memory._Memory` " + "or a type that supports Python buffer protocol" ) if dep_events_count == 0 or dep_events is NULL: @@ -1592,7 +1590,8 @@ cdef class SyclQueue(_SyclQueue): else: raise TypeError( "dependent_events must either None, or a sequence of " - ":class:`dpctl.SyclEvent` objects") + "`dpctl.SyclEvent` objects" + ) if nDE > 0: depEvents = ( malloc(nDE*sizeof(DPCTLSyclEventRef)) @@ -1703,25 +1702,28 @@ cdef class WorkGroupMemory: raise RuntimeError("Workgroup memory extension not available") if not (0 < len(args) < 3): - raise TypeError("WorkGroupMemory constructor takes 1 or 2 " - f"arguments, but {len(args)} were given") + raise TypeError( + "WorkGroupMemory constructor takes 1 or 2 arguments, but " + f"{len(args)} were given" + ) if len(args) == 1: if not isinstance(args[0], numbers.Integral): - raise TypeError("WorkGroupMemory single argument constructor" - "expects first argument to be `int`", - f"but got {type(args[0])}") + raise TypeError( + "WorkGroupMemory single argument constructor expects " + f"first argument to be `int` but got {type(args[0])}" + ) nbytes = (args[0]) else: if not isinstance(args[0], str): raise TypeError( - "WorkGroupMemory constructor expects first" - f"argument to be `str`, but got {type(args[0])}" + "WorkGroupMemory constructor expects first argument to be " + f"`str`, but got {type(args[0])}" ) if not isinstance(args[1], numbers.Integral): raise TypeError( - "WorkGroupMemory constructor expects second" - f"argument to be `int`, but got {type(args[1])}" + "WorkGroupMemory constructor expects second argument to " + f"be `int`, but got {type(args[1])}" ) dtype = (args[0]) count = (args[1]) @@ -1800,14 +1802,16 @@ cdef class RawKernelArg: raise RuntimeError("Raw kernel arg extension not available") if not (0 < len(args) < 3): - raise TypeError("RawKernelArg constructor takes 1 or 2 " - f"arguments, but {len(args)} were given") + raise TypeError( + "RawKernelArg constructor takes 1 or 2 arguments, but " + f"{len(args)} were given" + ) if len(args) == 1: if not _is_buffer(args[0]): - raise TypeError("RawKernelArg single argument constructor" - "expects argument to be buffer", - f"but got {type(args[0])}") + raise TypeError( + "RawKernelArg single argument constructor expects " + f"argument to be buffer but got {type(args[0])}") ret_code = PyObject_GetBuffer(args[0], &(_buffer), PyBUF_SIMPLE | PyBUF_ANY_CONTIGUOUS) @@ -1819,11 +1823,15 @@ cdef class RawKernelArg: _is_buf = True else: if not isinstance(args[0], numbers.Integral): - raise TypeError("RawKernelArg constructor expects first" - "argument to be `int`, but got {type(args[0])}") + raise TypeError( + "RawKernelArg constructor expects first argument to be " + f"`int`, but got {type(args[0])}" + ) if not isinstance(args[1], numbers.Integral): - raise TypeError("RawKernelArg constructor expects second" - "argument to be `int`, but got {type(args[1])}") + raise TypeError( + "RawKernelArg constructor expects second argument to be " + f"`int`, but got {type(args[1])}" + ) _is_buf = False count = args[0]