diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f57423eb7..00189783f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,11 +9,10 @@ repos: types: [text] types_or: [python, cython] - repo: https://github.com/ambv/black - rev: 19.10b0 + rev: 22.3.0 hooks: - id: black - additional_dependencies: - - click==8.0.4 + args: ["--config=python/pyproject.toml"] - repo: https://gitlab.com/pycqa/flake8 rev: 3.8.3 hooks: diff --git a/ci/checks/style.sh b/ci/checks/style.sh index eb41bc6b5..cec606871 100644 --- a/ci/checks/style.sh +++ b/ci/checks/style.sh @@ -19,7 +19,7 @@ ISORT=`isort --check-only python --settings-path=python/setup.cfg ` ISORT_RETVAL=$? # Run black and get results/return code -BLACK=`black --check python` +BLACK=`black --config python/pyproject.toml --check python` BLACK_RETVAL=$? # Run flake8 and get results/return code diff --git a/conda/environments/rmm_dev_cuda11.5.yml b/conda/environments/rmm_dev_cuda11.5.yml index 55558f015..40fd1f10c 100644 --- a/conda/environments/rmm_dev_cuda11.5.yml +++ b/conda/environments/rmm_dev_cuda11.5.yml @@ -5,11 +5,10 @@ channels: dependencies: - clang=11.1.0 - clang-tools=11.1.0 -- click=8.0.4 - cmake>=3.20.1,<3.23 - cmake-format=0.6.11 - flake8=3.8.3 -- black=19.10 +- black=22.3.0 - isort=5.6.4 - python>=3.8,<3.10 - numba>=0.49 diff --git a/conda/environments/rmm_dev_cuda11.6.yml b/conda/environments/rmm_dev_cuda11.6.yml index fff6f926a..50b116329 100644 --- a/conda/environments/rmm_dev_cuda11.6.yml +++ b/conda/environments/rmm_dev_cuda11.6.yml @@ -5,11 +5,10 @@ channels: dependencies: - clang=11.1.0 - clang-tools=11.1.0 -- click=8.0.4 - cmake>=3.20.1,<3.23 - cmake-format=0.6.11 - flake8=3.8.3 -- black=19.10 +- black=22.3.0 - isort=5.6.4 - python>=3.8,<3.10 - numba>=0.49 diff --git a/python/rmm/rmm.py b/python/rmm/rmm.py index 9c57c6ac6..f77df659a 100644 --- a/python/rmm/rmm.py +++ b/python/rmm/rmm.py @@ -137,7 +137,8 @@ def get_ipc_handle(self, memory): start, end = cuda.cudadrv.driver.device_extents(memory) ipchandle = (ctypes.c_byte * 64)() # IPC handle is 64 bytes cuda.cudadrv.driver.driver.cuIpcGetMemHandle( - ctypes.byref(ipchandle), start, + ctypes.byref(ipchandle), + start, ) source_info = cuda.current_context().device.get_device_identity() offset = memory.handle.value - start diff --git a/python/rmm/tests/test_rmm.py b/python/rmm/tests/test_rmm.py index c82c306c7..409ed6b72 100644 --- a/python/rmm/tests/test_rmm.py +++ b/python/rmm/tests/test_rmm.py @@ -526,7 +526,8 @@ def test_mr_upstream_lifetime(): @pytest.mark.skipif( - not _CUDAMALLOC_ASYNC_SUPPORTED, reason="cudaMallocAsync not supported", + not _CUDAMALLOC_ASYNC_SUPPORTED, + reason="cudaMallocAsync not supported", ) @pytest.mark.parametrize("dtype", _dtypes) @pytest.mark.parametrize("nelem", _nelems) @@ -539,7 +540,8 @@ def test_cuda_async_memory_resource(dtype, nelem, alloc): @pytest.mark.skipif( - not _CUDAMALLOC_ASYNC_SUPPORTED, reason="cudaMallocAsync not supported", + not _CUDAMALLOC_ASYNC_SUPPORTED, + reason="cudaMallocAsync not supported", ) @pytest.mark.parametrize("nelems", _nelems) def test_cuda_async_memory_resource_stream(nelems): @@ -555,7 +557,8 @@ def test_cuda_async_memory_resource_stream(nelems): @pytest.mark.skipif( - not _CUDAMALLOC_ASYNC_SUPPORTED, reason="cudaMallocAsync not supported", + not _CUDAMALLOC_ASYNC_SUPPORTED, + reason="cudaMallocAsync not supported", ) @pytest.mark.parametrize("nelem", _nelems) @pytest.mark.parametrize("alloc", _allocs)