File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 18
18
- id : black
19
19
exclude : " versioneer.py|dpctl/_version.py"
20
20
- repo : https://github.com/pycqa/isort
21
- rev : 5.10.1
21
+ rev : 5.12.0
22
22
hooks :
23
23
- id : isort
24
24
name : isort (python)
Original file line number Diff line number Diff line change @@ -290,6 +290,11 @@ cdef class SyclQueue(_SyclQueue):
290
290
props = _parse_queue_properties(
291
291
kwargs.pop(' property' , _queue_property_type._DEFAULT_PROPERTY)
292
292
)
293
+ if (kwargs):
294
+ raise TypeError (
295
+ f" Unsupported keyword arguments {kwargs} to "
296
+ " SyclQueue constructor encountered."
297
+ )
293
298
len_args = len (args)
294
299
if len_args == 0 :
295
300
status = self ._init_queue_default(props)
Original file line number Diff line number Diff line change @@ -84,6 +84,14 @@ def test_invalid_filter_selectors(invalid_filter):
84
84
dpctl .SyclQueue (invalid_filter )
85
85
86
86
87
+ def test_unexpected_keyword ():
88
+ """
89
+ An unexpected keyword use raises TypeError.
90
+ """
91
+ with pytest .raises (TypeError ):
92
+ dpctl .SyclQueue (device = "cpu" )
93
+
94
+
87
95
def test_context_not_equals ():
88
96
try :
89
97
gpuQ = dpctl .SyclQueue ("gpu" )
You can’t perform that action at this time.
0 commit comments