Skip to content

CLN: isort from attrs_caching.py to eval.py #25060

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from 3 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
4 changes: 3 additions & 1 deletion asv_bench/benchmarks/attrs_caching.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import numpy as np

from pandas import DataFrame

try:
from pandas.util import cache_readonly
except ImportError:
Expand Down Expand Up @@ -34,4 +36,4 @@ def time_cache_readonly(self):
self.obj.prop


from .pandas_vb_common import setup # noqa: F401
from .pandas_vb_common import setup # noqa: F401 isort:skip
Copy link
Member

Choose a reason for hiding this comment

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

IIRC from other PRs this was moved to the bottom of the benchmark instead of adding the skip. Would rather do the same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had this issue in #24958 where the linting fails if isort:skip isn't included. I'm looking into the other errors now and it looks like two of the benchmarks failed.

4 changes: 3 additions & 1 deletion asv_bench/benchmarks/binary_ops.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import numpy as np

from pandas import DataFrame, Series, date_range
from pandas.core.algorithms import checked_add_with_arr

try:
import pandas.core.computation.expressions as expr
except ImportError:
Expand Down Expand Up @@ -152,4 +154,4 @@ def time_add_overflow_both_arg_nan(self):
b_mask=self.arr_nan_2)


from .pandas_vb_common import setup # noqa: F401
from .pandas_vb_common import setup # noqa: F401 isort:skip
4 changes: 3 additions & 1 deletion asv_bench/benchmarks/categoricals.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import warnings

import numpy as np

import pandas as pd
import pandas.util.testing as tm

try:
from pandas.api.types import union_categoricals
except ImportError:
Expand Down Expand Up @@ -293,4 +295,4 @@ def time_sort_values(self):
self.index.sort_values(ascending=False)


from .pandas_vb_common import setup # noqa: F401
from .pandas_vb_common import setup # noqa: F401 isort:skip
5 changes: 3 additions & 2 deletions asv_bench/benchmarks/ctors.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import numpy as np

from pandas import DatetimeIndex, Index, MultiIndex, Series, Timestamp
import pandas.util.testing as tm
from pandas import Series, Index, DatetimeIndex, Timestamp, MultiIndex


def no_change(arr):
Expand Down Expand Up @@ -100,4 +101,4 @@ def time_multiindex_from_iterables(self):
MultiIndex.from_product(self.iterables)


from .pandas_vb_common import setup # noqa: F401
from .pandas_vb_common import setup # noqa: F401 isort:skip
4 changes: 3 additions & 1 deletion asv_bench/benchmarks/eval.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import numpy as np

import pandas as pd

try:
import pandas.core.computation.expressions as expr
except ImportError:
Expand Down Expand Up @@ -61,4 +63,4 @@ def time_query_with_boolean_selection(self):
self.df.query('(a >= @self.min_val) & (a <= @self.max_val)')


from .pandas_vb_common import setup # noqa: F401
from .pandas_vb_common import setup # noqa: F401 isort:skip
7 changes: 1 addition & 6 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,7 @@ force_sort_within_sections=True
skip=
pandas/core/api.py,
pandas/core/frame.py,
asv_bench/benchmarks/attrs_caching.py,
asv_bench/benchmarks/binary_ops.py,
asv_bench/benchmarks/categoricals.py,
asv_bench/benchmarks/ctors.py,
asv_bench/benchmarks/eval.py,
asv_bench/benchmarks/dtypes.py,
asv_bench/benchmarks/frame_ctor.py,
asv_bench/benchmarks/frame_methods.py,
asv_bench/benchmarks/gil.py,
Expand Down Expand Up @@ -149,7 +145,6 @@ skip=
asv_bench/benchmarks/timeseries.py
asv_bench/benchmarks/pandas_vb_common.py
asv_bench/benchmarks/offset.py
asv_bench/benchmarks/dtypes.py
asv_bench/benchmarks/strings.py
asv_bench/benchmarks/period.py
pandas/__init__.py
Expand Down