Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update black version #1010

Merged
merged 6 commits into from
Apr 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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