Skip to content

Commit 6e358cf

Browse files
Merge remote-tracking branch 'origin/master' into change_linspace_int
2 parents 7efd258 + 8c3f3d5 commit 6e358cf

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

.github/workflows/python_style_checks.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
with:
4242
src: "."
4343
options: "--check"
44+
version: "22.12.0"
4445

4546
flake8:
4647
runs-on: ubuntu-latest

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ repos:
1313
- id: end-of-file-fixer
1414
- id: trailing-whitespace
1515
- repo: https://github.com/psf/black
16-
rev: 22.10.0
16+
rev: 22.12.0
1717
hooks:
1818
- id: black
1919
exclude: "versioneer.py|dpctl/_version.py"
2020
- repo: https://github.com/pycqa/isort
21-
rev: 5.10.1
21+
rev: 5.12.0
2222
hooks:
2323
- id: isort
2424
name: isort (python)

dpctl/_sycl_queue.pyx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,11 @@ cdef class SyclQueue(_SyclQueue):
290290
props = _parse_queue_properties(
291291
kwargs.pop('property', _queue_property_type._DEFAULT_PROPERTY)
292292
)
293+
if (kwargs):
294+
raise TypeError(
295+
f"Unsupported keyword arguments {kwargs} to "
296+
"SyclQueue constructor encountered."
297+
)
293298
len_args = len(args)
294299
if len_args == 0:
295300
status = self._init_queue_default(props)

dpctl/tests/test_sycl_queue.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,14 @@ def test_invalid_filter_selectors(invalid_filter):
8484
dpctl.SyclQueue(invalid_filter)
8585

8686

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+
8795
def test_context_not_equals():
8896
try:
8997
gpuQ = dpctl.SyclQueue("gpu")

0 commit comments

Comments
 (0)