Skip to content
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: 5 additions & 0 deletions distributed/shuffle/tests/test_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
import asyncio
from typing import TYPE_CHECKING

import pytest

pd = pytest.importorskip("pandas")
pytest.importorskip("dask.dataframe")

import dask
import dask.dataframe as dd
Comment on lines +6 to 12

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import pytest
pd = pytest.importorskip("pandas")
pytest.importorskip("dask.dataframe")
import dask
import dask.dataframe as dd
import pytest
dd = pytest.importorskip("dask.dataframe")
import dask

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mypy is giving a

mypy.....................................................................Failed
- hook id: mypy
- exit code: 1

distributed/shuffle/tests/test_graph.py:25: error: Name "dd.DataFrame" is not defined
distributed/shuffle/tests/test_graph.py:26: error: Name "dd.DataFrame" is not defined
Found 2 errors in 1 file (checked 254 source files)

error. I'm going to revert to what I had originally, which mypy was happy with. Happy to do a follow-up to cleanup, but I'm confident in this PR and want to include it in the release today

from dask.blockwise import Blockwise
Expand Down
4 changes: 2 additions & 2 deletions distributed/shuffle/tests/test_shuffle_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
from collections import Counter
from typing import TYPE_CHECKING

import pandas as pd
import pytest

import dask.dataframe as dd
pd = pytest.importorskip("pandas")
dd = pytest.importorskip("dask.dataframe")

from distributed.utils_test import gen_cluster

Expand Down