Skip to content

Commit

Permalink
Update black version (#1010)
Browse files Browse the repository at this point in the history
This PR updates to black 22.3.0 which contains a critical bugfix for a recent release of Click 8.1.0. It also includes some minor reformatting associated with the version bump.

Authors:
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - https://github.com/jakirkham
  - Jordan Jacobelli (https://github.com/Ethyling)

URL: #1010
  • Loading branch information
vyasr committed Apr 1, 2022
1 parent 484333f commit 921d286
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
5 changes: 2 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion ci/checks/style.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions conda/environments/rmm_dev_cuda11.5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions conda/environments/rmm_dev_cuda11.6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion python/rmm/rmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions python/rmm/tests/test_rmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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):
Expand All @@ -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)
Expand Down

0 comments on commit 921d286

Please sign in to comment.