Skip to content

Commit fda07b0

Browse files
jonasvddjvdd
andauthored
Improve monotonic assert + fix black formatting in vscode (#162)
* 📝 improve assert message, see #158 * ⚔️ remove black formatting color argument, see #161 * 🙈 formatting * 🖊️ review code Co-authored-by: Jeroen Van Der Donckt <[email protected]>
1 parent 9b074e1 commit fda07b0

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

plotly_resampler/figure_resampler/figure_resampler_interface.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,11 @@ def _construct_hf_data_dict(
780780
hf_series = self._to_hf_series(x=dc.x, y=dc.y)
781781

782782
# Checking this now avoids less interpretable `KeyError` when resampling
783-
assert hf_series.index.is_monotonic_increasing
783+
assert hf_series.index.is_monotonic_increasing, (
784+
"In order to perform time series aggregation, the data must be "
785+
"sorted in time; i.e., the x-data must be (non-strictly) "
786+
"monotonically increasing."
787+
)
784788

785789
# As we support prefix-suffixing of downsampled data, we assure that
786790
# each trace has a name

pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ ignore = ["E501"] # Never enforce `E501` (line length violations).
6565

6666
# Formatting
6767
[tool.black]
68-
color = true
6968
line-length = 88
7069

7170
# Sort imports

0 commit comments

Comments
 (0)