Skip to content

Commit

Permalink
Update to flake8 7.1.1. (#1385)
Browse files Browse the repository at this point in the history
We need to update flake8 to fix a false-positive that appears with older flake8 versions on Python 3.12.

Authors:
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - James Lamb (https://github.com/jameslamb)
  - Benjamin Zaitlen (https://github.com/quasiben)
  - Peter Andreas Entschev (https://github.com/pentschev)

URL: #1385
  • Loading branch information
bdice authored Sep 17, 2024
1 parent d5b70f0 commit dbb50a5
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repos:
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 3.8.3
rev: 7.1.1
hooks:
- id: flake8
- repo: https://github.com/codespell-project/codespell
Expand Down
2 changes: 1 addition & 1 deletion dask_cuda/benchmarks/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ def print_throughput_bandwidth(
)
print_key_value(
key="Wall clock",
value=f"{format_time(durations.mean())} +/- {format_time(durations.std()) }",
value=f"{format_time(durations.mean())} +/- {format_time(durations.std())}",
)
if not args.no_show_p2p_bandwidth:
print_separator(separator="=")
Expand Down
9 changes: 5 additions & 4 deletions dask_cuda/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,11 @@ def cuda():
@click.option(
"--rmm-release-threshold",
default=None,
help="""When ``rmm.async`` is ``True`` and the pool size grows beyond this value, unused
memory held by the pool will be released at the next synchronization point. Can be
an integer (bytes), float (fraction of total device memory), string (like ``"5GB"``
or ``"5000M"``) or ``None``. By default, this feature is disabled.
help="""When ``rmm.async`` is ``True`` and the pool size grows beyond this
value, unused memory held by the pool will be released at the next
synchronization point. Can be an integer (bytes), float (fraction of total
device memory), string (like ``"5GB"`` or ``"5000M"``) or ``None``. By
default, this feature is disabled.
.. note::
This size is a per-worker configuration, and not cluster-wide.""",
Expand Down
2 changes: 1 addition & 1 deletion dask_cuda/tests/test_gds.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def test_gds(gds_enabled, cuda_lib):
a = data_create()
header, frames = serialize(a, serializers=("disk",))
b = deserialize(header, frames)
assert type(a) == type(b)
assert type(a) is type(b)
assert data_compare(a, b)
finally:
ProxifyHostFile.register_disk_spilling() # Reset disk spilling options
2 changes: 1 addition & 1 deletion dask_cuda/tests/test_proxify_host_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def task(x):
assert "ProxyObject" in str(type(x))
assert x._pxy_get().serializer == "dask"
else:
assert type(x) == cudf.DataFrame
assert type(x) is cudf.DataFrame
assert len(x) == 10 # Trigger deserialization
return x

Expand Down
10 changes: 5 additions & 5 deletions dask_cuda/tests/test_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def test_proxy_object_of_array(serializers, backend):
pxy = proxy_object.asproxy(org.copy(), serializers=serializers)
expect = op(org)
got = op(pxy)
assert type(expect) == type(got)
assert type(expect) is type(got)
assert expect == got

# Check unary operators
Expand All @@ -124,7 +124,7 @@ def test_proxy_object_of_array(serializers, backend):
pxy = proxy_object.asproxy(org.copy(), serializers=serializers)
expect = op(org)
got = op(pxy)
assert type(expect) == type(got)
assert type(expect) is type(got)
assert all(expect == got)

# Check binary operators that takes a scalar as second argument
Expand All @@ -134,7 +134,7 @@ def test_proxy_object_of_array(serializers, backend):
pxy = proxy_object.asproxy(org.copy(), serializers=serializers)
expect = op(org, 2)
got = op(pxy, 2)
assert type(expect) == type(got)
assert type(expect) is type(got)
assert all(expect == got)

# Check binary operators
Expand Down Expand Up @@ -192,7 +192,7 @@ def test_proxy_object_of_array(serializers, backend):
pxy = proxy_object.asproxy(org.copy(), serializers=serializers)
expect = op(org)
got = op(pxy)
assert type(expect) == type(got)
assert type(expect) is type(got)
assert expect == got

# Check reflected methods
Expand Down Expand Up @@ -297,7 +297,7 @@ def task(x):
assert "ProxyObject" in str(type(x))
assert x._pxy_get().serializer == "dask"
else:
assert type(x) == cudf.DataFrame
assert type(x) is cudf.DataFrame
assert len(x) == 10 # Trigger deserialization
return x

Expand Down

0 comments on commit dbb50a5

Please sign in to comment.