black formatting

master
Martin Lackner 2022-02-16 17:41:55 +01:00
rodzic d6ad9ef573
commit b618119210
3 zmienionych plików z 3 dodań i 14 usunięć

Wyświetl plik

@ -43,7 +43,6 @@ jobs:
- name: Test with pytest
run: |
# note that some tests are skipped because Gurobi is not available on Github
coverage run --source=. -m pytest -v --tb=long -m unittests.py
- name: Generate coverage report

Wyświetl plik

@ -10,18 +10,11 @@ parties = 5
seats = 20
methods = ["quota", "largest_remainder", "dhondt", "saintelague", "adams"]
iterator = combinations(range(1, maxvoters + 1), parties)
for iterations, votes in enumerate(iterator):
for iterations, votes in enumerate(combinations(range(1, maxvoters + 1), parties)):
apportionments = set()
for method in methods:
apportionments.add(
tuple(
app.compute(method, votes, seats, verbose=False)
)
)
apportionments.add(tuple(app.compute(method, votes, seats, verbose=False)))
if len(apportionments) == len(methods):
break
@ -33,6 +26,4 @@ print("votes = {}".format(votes))
print("found in {} iterations\n\n".format(iterations))
for method in methods:
print(
"{:>20s}: {}".format(method, app.compute(method, votes, seats, verbose=False))
)
print("{:>20s}: {}".format(method, app.compute(method, votes, seats, verbose=False)))

Wyświetl plik

@ -100,4 +100,3 @@ setuptools.setup(
]
},
)