Skip to content

Commit 7937963

Browse files
committed
Move import to only happen for type checking for hints
1 parent a3429ab commit 7937963

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

python/datafusion/dataframe.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
from __future__ import annotations
22

3-
from typing import Any, List
3+
from typing import Any, List, TYPE_CHECKING
44
from datafusion.record_batch import RecordBatchStream
55
from typing_extensions import deprecated
6-
import pyarrow as pa
7-
import pandas as pd
8-
import polars as pl
6+
7+
if TYPE_CHECKING:
8+
import pyarrow as pa
9+
import pandas as pd
10+
import polars as pl
911

1012
from datafusion._internal import DataFrame as DataFrameInternal
1113
from datafusion.expr import Expr

0 commit comments

Comments
 (0)