Skip to content

Commit 796bc80

Browse files
committed
fix: fix test linting issue
1 parent c287983 commit 796bc80

14 files changed

+34
-30
lines changed

tests/analysis/test_cross_shop.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
cols = ColumnHelper()
1010

1111

12-
@pytest.fixture()
12+
@pytest.fixture
1313
def sample_data():
1414
"""Sample data for testing."""
1515
return pd.DataFrame(

tests/analysis/test_haversine.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
"""Tests for the haversine distance module."""
2+
23
import ibis
34
import pandas as pd
45
import pytest
56

67
from pyretailscience.analysis.haversine import haversine_distance
78

89

9-
@pytest.fixture()
10+
@pytest.fixture
1011
def sample_ibis_table():
1112
"""Fixture to provide a sample Ibis table for testing."""
1213
data = {

tests/analysis/test_product_association.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
class TestProductAssociations:
1313
"""Tests for the ProductAssociations class."""
1414

15-
@pytest.fixture()
15+
@pytest.fixture
1616
def transactions_df(self) -> pd.DataFrame:
1717
"""Return a sample DataFrame for testing."""
1818
# fmt: off
@@ -23,7 +23,7 @@ def transactions_df(self) -> pd.DataFrame:
2323
})
2424
# fmt: on
2525

26-
@pytest.fixture()
26+
@pytest.fixture
2727
def expected_results_single_items_df(self) -> pd.DataFrame:
2828
"""Return the expected results for the single items association analysis."""
2929
# fmt: off
@@ -58,7 +58,7 @@ def expected_results_single_items_df(self) -> pd.DataFrame:
5858
)
5959
# fmt: on
6060

61-
@pytest.fixture()
61+
@pytest.fixture
6262
def expected_results_pair_items_df(self) -> pd.DataFrame:
6363
"""Return the expected results for the pair items association analysis."""
6464
# fmt: off

tests/analysis/test_revenue_tree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
class TestRevenueTree:
1313
"""Test the RevenueTree class."""
1414

15-
@pytest.fixture()
15+
@pytest.fixture
1616
def cols(self):
1717
"""Return a ColumnHelper instance."""
1818
return ColumnHelper()

tests/plots/test_area.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Tests for the plots.area module."""
2+
23
from itertools import cycle
34

45
import numpy as np
@@ -13,7 +14,7 @@
1314
RNG = np.random.default_rng(42)
1415

1516

16-
@pytest.fixture()
17+
@pytest.fixture
1718
def sample_dataframe():
1819
"""A sample dataframe for Jeans sales data."""
1920
data = {
@@ -24,7 +25,7 @@ def sample_dataframe():
2425
return pd.DataFrame(data)
2526

2627

27-
@pytest.fixture()
28+
@pytest.fixture
2829
def _mock_color_generators(mocker):
2930
"""Mock the color generators for single and multi color maps."""
3031
single_color_gen = cycle(["#FF0000"]) # Mocked single-color generator (e.g., red)
@@ -34,7 +35,7 @@ def _mock_color_generators(mocker):
3435
mocker.patch("pyretailscience.style.tailwind.get_multi_color_cmap", return_value=multi_color_gen)
3536

3637

37-
@pytest.fixture()
38+
@pytest.fixture
3839
def _mock_gu_functions(mocker):
3940
mocker.patch("pyretailscience.style.graph_utils.standard_graph_styles", side_effect=lambda ax, **kwargs: ax)
4041
mocker.patch("pyretailscience.style.graph_utils.standard_tick_styles", side_effect=lambda ax: ax)

tests/plots/test_bar.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from pyretailscience.style import graph_utils as gu
1313

1414

15-
@pytest.fixture()
15+
@pytest.fixture
1616
def sample_dataframe():
1717
"""A sample dataframe for testing."""
1818
data = {
@@ -23,13 +23,13 @@ def sample_dataframe():
2323
return pd.DataFrame(data)
2424

2525

26-
@pytest.fixture()
26+
@pytest.fixture
2727
def sample_series():
2828
"""A sample series for testing."""
2929
return pd.Series([1000, 1500, 2000, 2500], index=["A", "B", "C", "D"])
3030

3131

32-
@pytest.fixture()
32+
@pytest.fixture
3333
def _mock_color_generators(mocker):
3434
"""Mock the color generators for single and multi color maps."""
3535
single_color_gen = cycle(["#FF0000"]) # Mocked single-color generator (e.g., red)
@@ -38,7 +38,7 @@ def _mock_color_generators(mocker):
3838
mocker.patch("pyretailscience.style.tailwind.get_multi_color_cmap", return_value=multi_color_gen)
3939

4040

41-
@pytest.fixture()
41+
@pytest.fixture
4242
def _mock_gu_functions(mocker):
4343
"""Mock the standard graph utilities functions."""
4444
mocker.patch("pyretailscience.style.graph_utils.standard_graph_styles", side_effect=lambda ax, **kwargs: ax)

tests/plots/test_histogram.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from pyretailscience.style import graph_utils as gu
1212

1313

14-
@pytest.fixture()
14+
@pytest.fixture
1515
def sample_dataframe():
1616
"""A sample dataframe for testing."""
1717
data = {
@@ -22,20 +22,20 @@ def sample_dataframe():
2222
return pd.DataFrame(data)
2323

2424

25-
@pytest.fixture()
25+
@pytest.fixture
2626
def sample_series():
2727
"""A sample series for testing."""
2828
return pd.Series([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
2929

3030

31-
@pytest.fixture()
31+
@pytest.fixture
3232
def _mock_color_generators(mocker):
3333
"""Mock the color generator for multi color maps."""
3434
multi_color_gen = cycle(["#FF0000", "#00FF00", "#0000FF"]) # Mocked multi-color generator
3535
mocker.patch("pyretailscience.style.tailwind.get_multi_color_cmap", return_value=multi_color_gen)
3636

3737

38-
@pytest.fixture()
38+
@pytest.fixture
3939
def _mock_gu_functions(mocker):
4040
"""Mock standard graph utilities functions."""
4141
mocker.patch("pyretailscience.style.graph_utils.standard_graph_styles", side_effect=lambda ax, **kwargs: ax)

tests/plots/test_index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def test_get_indexes_with_ibis_table_input():
195195
class TestIndexPlot:
196196
"""Tests for the index_plot function."""
197197

198-
@pytest.fixture()
198+
@pytest.fixture
199199
def test_data(self):
200200
"""Return a sample dataframe for plotting."""
201201
rng = np.random.default_rng()

tests/plots/test_line.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from pyretailscience.style import graph_utils as gu
1212

1313

14-
@pytest.fixture()
14+
@pytest.fixture
1515
def sample_dataframe():
1616
"""A sample dataframe for testing."""
1717
data = {
@@ -22,7 +22,7 @@ def sample_dataframe():
2222
return pd.DataFrame(data)
2323

2424

25-
@pytest.fixture()
25+
@pytest.fixture
2626
def _mock_color_generators(mocker):
2727
"""Mock the color generators for single and multi color maps."""
2828
single_color_gen = cycle(["#FF0000"]) # Mocked single-color generator (e.g., red)
@@ -32,7 +32,7 @@ def _mock_color_generators(mocker):
3232
mocker.patch("pyretailscience.style.tailwind.get_multi_color_cmap", return_value=multi_color_gen)
3333

3434

35-
@pytest.fixture()
35+
@pytest.fixture
3636
def _mock_gu_functions(mocker):
3737
mocker.patch("pyretailscience.style.graph_utils.standard_graph_styles", side_effect=lambda ax, **kwargs: ax)
3838
mocker.patch("pyretailscience.style.graph_utils.standard_tick_styles", side_effect=lambda ax: ax)

tests/plots/test_scatter.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Tests for the plots.scatter module."""
2+
23
from itertools import cycle
34

45
import numpy as np
@@ -13,7 +14,7 @@
1314
RNG = np.random.default_rng(42)
1415

1516

16-
@pytest.fixture()
17+
@pytest.fixture
1718
def sample_sales_dataframe():
1819
"""A sample dataframe for Sales, Profit, and Expenses data."""
1920
data = {
@@ -26,7 +27,7 @@ def sample_sales_dataframe():
2627
return pd.DataFrame(data)
2728

2829

29-
@pytest.fixture()
30+
@pytest.fixture
3031
def _mock_color_generators(mocker):
3132
"""Mock the color generators for single and multi-color maps."""
3233
single_color_gen = cycle(["#FF0000"])
@@ -36,7 +37,7 @@ def _mock_color_generators(mocker):
3637
mocker.patch("pyretailscience.style.tailwind.get_multi_color_cmap", return_value=multi_color_gen)
3738

3839

39-
@pytest.fixture()
40+
@pytest.fixture
4041
def _mock_gu_functions(mocker):
4142
mocker.patch("pyretailscience.style.graph_utils.standard_graph_styles", side_effect=lambda ax, **kwargs: ax)
4243
mocker.patch("pyretailscience.style.graph_utils.standard_tick_styles", side_effect=lambda ax: ax)

0 commit comments

Comments
 (0)