Skip to content

Commit 0f86e2f

Browse files
committed
lint fixes
1 parent b67f58a commit 0f86e2f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pandas/core/sample.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ def sample(
153153
is_max_weight_dominating = size * max(weights) > 1
154154
if (is_max_weight_dominating and not replace):
155155
raise ValueError(
156-
"Invalid weights: If `replace`=False,"
157-
" total unit probabilities have to be less than 1"
156+
"Invalid weights: If `replace`=False, "
157+
"total unit probabilities have to be less than 1"
158158
)
159159

160160
return random_state.choice(obj_len, size=size, replace=replace, p=weights).astype(

pandas/tests/frame/methods/test_sample.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ def test_sample_unit_probabilities_raises(self, obj):
139139
high_variance_weights = [1] * 10
140140
high_variance_weights[0] = 100
141141
msg = (
142-
"Invalid weights: If `replace`=False,"
143-
" total unit probabilities have to be less than 1"
142+
"Invalid weights: If `replace`=False, "
143+
"total unit probabilities have to be less than 1"
144144
)
145145
with pytest.raises(ValueError, match=msg):
146146
obj.sample(n=2, weights=high_variance_weights, replace=False)

0 commit comments

Comments
 (0)