Skip to content

Commit

Permalink
Adding isort
Browse files Browse the repository at this point in the history
  • Loading branch information
mwiewior committed Dec 12, 2024
1 parent 0152811 commit a26c10b
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@ repos:
- id: ruff
types_or: [python, pyi, jupyter]
args: [--fix, --show-fixes, --exit-non-zero-on-fix]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args: [--profile, black]
2 changes: 1 addition & 1 deletion polars_bio/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .overlap import overlap, ctx
from .overlap import ctx, overlap
from .polars_bio import OverlapFilter

__all__ = ["overlap", "ctx", "OverlapFilter"]
4 changes: 2 additions & 2 deletions polars_bio/overlap.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import pyarrow.compute as pc
from polars.io.plugins import register_io_source
from typing_extensions import TYPE_CHECKING, Union
from .polars_bio import overlap_scan, overlap_frame
from .polars_bio import BioSessionContext, OverlapFilter

from .polars_bio import BioSessionContext, OverlapFilter, overlap_frame, overlap_scan


def singleton(cls):
Expand Down
2 changes: 1 addition & 1 deletion tests/_expected.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import mdpd
from pathlib import Path

import mdpd
import pandas as pd
import polars as pl

Expand Down
5 changes: 3 additions & 2 deletions tests/test_bioframe.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import bioframe as bf
import pandas as pd
import polars_bio as pb

from _expected import BIO_PD_DF1, BIO_PD_DF2

import polars_bio as pb
from polars_bio import OverlapFilter


class TestOverlapBioframe:
result = pb.overlap(BIO_PD_DF1, BIO_PD_DF2, output_type="pandas.DataFrame", overlap_filter=OverlapFilter.Strict)
result_bio = bf.overlap(BIO_PD_DF1, BIO_PD_DF2,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_native_overlap.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pandas as pd
from _expected import DF_PATH1, DF_PATH2, PD_DF_OVERLAP

import polars_bio as pb
from _expected import PD_DF_OVERLAP, DF_PATH1, DF_PATH2


class TestOverlapNative:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pandas_overlap.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pandas as pd
from _expected import PD_DF1, PD_DF2, PD_DF_OVERLAP

import polars_bio as pb
from _expected import PD_DF_OVERLAP, PD_DF1, PD_DF2


class TestOverlapPandas:
Expand Down
3 changes: 2 additions & 1 deletion tests/test_polars_overlap.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from _expected import PL_DF1, PL_DF2, PL_DF_OVERLAP

import polars_bio as pb
from _expected import PL_DF_OVERLAP, PL_DF1, PL_DF2


class TestOverlapPolars:
Expand Down

0 comments on commit a26c10b

Please sign in to comment.