Skip to content

Commit 78e72c9

Browse files
authored
Apply import ordering in ruff check (#1001)
1 parent dfe4242 commit 78e72c9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+221
-189
lines changed

benchmarks/db-benchmark/groupby-datafusion.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,23 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
import os
1918
import gc
19+
import os
2020
import timeit
21+
2122
import datafusion as df
23+
import pyarrow
2224
from datafusion import (
23-
col,
24-
functions as f,
2525
RuntimeEnvBuilder,
2626
SessionConfig,
2727
SessionContext,
28+
col,
29+
)
30+
from datafusion import (
31+
functions as f,
2832
)
29-
import pyarrow
3033
from pyarrow import csv as pacsv
3134

32-
3335
print("# groupby-datafusion.py", flush=True)
3436

3537
exec(open("./_helpers/helpers.py").read())

benchmarks/db-benchmark/join-datafusion.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
import os
1918
import gc
19+
import os
2020
import timeit
21+
2122
import datafusion as df
22-
from datafusion import functions as f
2323
from datafusion import col
24+
from datafusion import functions as f
2425
from pyarrow import csv as pacsv
2526

26-
2727
print("# join-datafusion.py", flush=True)
2828

2929
exec(open("./_helpers/helpers.py").read())

benchmarks/tpch/tpch.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616
# under the License.
1717

1818
import argparse
19-
from datafusion import SessionContext
2019
import time
2120

21+
from datafusion import SessionContext
22+
2223

2324
def bench(data_path, query_path):
2425
with open("results.csv", "w") as results:

dev/release/generate-changelog.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@
1616
# limitations under the License.
1717

1818
import argparse
19-
import sys
20-
from github import Github
2119
import os
2220
import re
2321
import subprocess
22+
import sys
23+
24+
from github import Github
2425

2526

2627
def print_pulls(repo_name, title, pulls):

examples/export.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
import datafusion
1919

20-
2120
# create a context
2221
ctx = datafusion.SessionContext()
2322

examples/ffi-table-provider/python/tests/_test_table_provider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18+
import pyarrow as pa
1819
from datafusion import SessionContext
1920
from ffi_table_provider import MyTableProvider
20-
import pyarrow as pa
2121

2222

2323
def test_table_loading():

examples/import.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@
1616
# under the License.
1717

1818
import datafusion
19-
import pyarrow as pa
2019
import pandas as pd
2120
import polars as pl
22-
21+
import pyarrow as pa
2322

2423
# Create a context
2524
ctx = datafusion.SessionContext()

examples/python-udaf.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18+
import datafusion
1819
import pyarrow
1920
import pyarrow.compute
20-
import datafusion
21-
from datafusion import udaf, Accumulator
22-
from datafusion import col
21+
from datafusion import Accumulator, col, udaf
2322

2423

2524
class MyAccumulator(Accumulator):

examples/python-udf-comparisons.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
from datafusion import SessionContext, col, lit, udf, functions as F
1918
import os
19+
import time
20+
2021
import pyarrow as pa
2122
import pyarrow.compute as pc
22-
import time
23+
from datafusion import SessionContext, col, lit, udf
24+
from datafusion import functions as F
2325

2426
path = os.path.dirname(os.path.abspath(__file__))
2527
filepath = os.path.join(path, "./tpch/data/lineitem.parquet")

examples/python-udf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
# under the License.
1717

1818
import pyarrow
19-
from datafusion import udf, SessionContext, functions as f
19+
from datafusion import SessionContext, udf
20+
from datafusion import functions as f
2021

2122

2223
def is_null(array: pyarrow.Array) -> pyarrow.Array:

0 commit comments

Comments
 (0)