Skip to content

Commit 5778005

Browse files
committed
Update error docs
1 parent 8353296 commit 5778005

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def run(self):
2020

2121
setup(
2222
name="vania",
23-
version="0.1.0",
23+
version="0.1.1",
2424
description="A module to fairly distribute objects among targets considering weights.",
2525
license="MIT",
2626
author="Hackathonners",

vania/fair_distributor.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,19 @@ def validate(self):
4242
def _validate(self):
4343
if len(self._weights) != len(self._targets):
4444
raise ValueError(
45-
"The number of lines on the weights should match the targets' length")
45+
"The amount of weight lines should match the amount of targets")
4646

4747
# All values should be positive
4848
s = list(
4949
dropwhile(lambda x: len(x) == len(self._objects), self._weights))
5050
if len(s) != 0:
5151
raise ValueError(
52-
"The number of columns on the weights should match the objects' length")
52+
"The amount of weight columns should match the amount of objects")
5353
for lines in self._weights:
5454
for i in lines:
5555
if i < 0:
5656
raise ValueError(
57-
"All values on the weights should be positive")
57+
"All weights must be positive")
5858

5959
def distribute(self, fairness=True, output=None):
6060
"""

0 commit comments

Comments
 (0)