Skip to content

Commit c948ab7

Browse files
committed
fix: fix more linting issues
1 parent 796bc80 commit c948ab7

File tree

8 files changed

+13
-9
lines changed

8 files changed

+13
-9
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ repos:
66
args: ["--fix"]
77
- id: ruff-format
88
- repo: https://github.com/pre-commit/pre-commit-hooks
9-
rev: v4.5.0
9+
rev: v5.0.0
1010
hooks:
1111
- id: trailing-whitespace
1212
- id: end-of-file-fixer

docs/examples/cross_shop.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,9 @@
238238
"source": [
239239
"shoes_idx = df[\"category_1_name\"] == \"Shoes\"\n",
240240
"df.loc[shoes_idx, \"category_1_name\"] = np.random.RandomState(42).choice(\n",
241-
" [\"Shoes\", \"Jeans\"], size=shoes_idx.sum(), p=[0.5, 0.5],\n",
241+
" [\"Shoes\", \"Jeans\"],\n",
242+
" size=shoes_idx.sum(),\n",
243+
" p=[0.5, 0.5],\n",
242244
")"
243245
]
244246
},

docs/examples/gain_loss.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,9 @@
254254
"# Reasign half the rows to Calvin Klein and leave the other half as Diesel\n",
255255
"p2_diesel_idx = time_period_2 & (df[\"brand_name\"] == \"Diesel\")\n",
256256
"df.loc[p2_diesel_idx, \"brand_name\"] = np.random.RandomState(42).choice(\n",
257-
" [\"Calvin Klein\", \"Diesel\"], size=p2_diesel_idx.sum(), p=[0.75, 0.25],\n",
257+
" [\"Calvin Klein\", \"Diesel\"],\n",
258+
" size=p2_diesel_idx.sum(),\n",
259+
" p=[0.75, 0.25],\n",
258260
")\n",
259261
"\n",
260262
"# Apply a 20% discount to Calvin Klein products and increase the quantity by 50%\n",

docs/examples/segmentation.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -701,10 +701,10 @@
701701
" },\n",
702702
" color=\"black\",\n",
703703
" bbox={\n",
704-
" \"facecolor\":\"white\",\n",
705-
" \"edgecolor\":\"white\",\n",
706-
" \"boxstyle\":\"round,rounding_size=0.75\",\n",
707-
" \"pad\":0.75,\n",
704+
" \"facecolor\": \"white\",\n",
705+
" \"edgecolor\": \"white\",\n",
706+
" \"boxstyle\": \"round,rounding_size=0.75\",\n",
707+
" \"pad\": 0.75,\n",
708708
" },\n",
709709
" linespacing=1.5,\n",
710710
")\n",

pyretailscience/analysis/cross_shop.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""This module contains the CrossShop class that is used to create a cross-shop diagram."""
22

3-
43
import ibis
54
import matplotlib.pyplot as plt
65
import pandas as pd

pyretailscience/analysis/haversine.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
- **Requires Ibis-Compatible Backend**: Ensure your Ibis backend supports trigonometric functions.
2222
- **Assumes Spherical Earth**: Uses the Haversine formula, which introduces slight inaccuracies due to Earth's oblate shape.
2323
"""
24+
2425
import ibis
2526

2627

pyretailscience/plots/time.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
- **Helper functions**: Utilizes utility functions from the `pyretailscience` package to handle styling, formatting, and other plot adjustments.
3434
"""
3535

36-
3736
import numpy as np
3837
import pandas as pd
3938
from matplotlib.axes import Axes, SubplotBase

pyretailscience/plots/venn.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
- **Pre-Aggregated Data Required**: The module does not perform data aggregation; input data should already be structured correctly.
2323
2424
"""
25+
2526
from collections.abc import Callable
2627

2728
import pandas as pd

0 commit comments

Comments
 (0)