Skip to content

Commit 0e053d8

Browse files
committed
black
1 parent d127031 commit 0e053d8

4 files changed

Lines changed: 10 additions & 4 deletions

File tree

src/electiondata/userinterface/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,10 @@ def get_contest_type_display(item: str) -> str:
928928

929929

930930
def get_filtered_input_options(
931-
session: Session, menu_type: str, filters: List[str], major_subdivision_type: Dict[str, str]
931+
session: Session,
932+
menu_type: str,
933+
filters: List[str],
934+
major_subdivision_type: Dict[str, str],
932935
) -> List[Dict[str, Any]]:
933936
"""Display dropdown menu options for menu <menu_type>, limited to any strings in <filters>
934937
(unless <filters> is None, in which case all are displayed. Sort as necessary"""

tests/analyzer_tests/conftest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ def pytest_addoption(parser):
1212
default=os.path.join(Path(__file__).parents[1].absolute(), "run_time.ini"),
1313
)
1414

15+
1516
# set up fixtures so tests can call them as arguments
1617
@pytest.fixture(scope="session")
1718
def param_file(request):
@@ -44,6 +45,7 @@ def analyzer(param_file):
4445

4546
tests_path = Path(__file__).parents[1].absolute()
4647

48+
4749
@pytest.fixture(scope="session")
4850
def tests_path():
49-
return Path(__file__).parents[1].absolute()
51+
return Path(__file__).parents[1].absolute()

tests/analyzer_tests/test_analyzer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from typing import Dict, Any, List, Optional
33

44

5-
65
# some lists of dictionaries need to be sorted by a particular key
76
def dict_sort(
87
list_of_dicts: List[Dict[str, Any]],
@@ -35,6 +34,7 @@ def test_election_data_exists(analyzer):
3534
has_data = [(e, j) for (e, j) in ej_pairs if analyzer.data_exists(e, j)]
3635
assert set(has_data) == set(ej_pairs)
3736

37+
3838
def test_contest_updatelabels_display(analyzer):
3939
new = dict_sort(
4040
analyzer.display_options(
@@ -48,6 +48,7 @@ def test_contest_updatelabels_display(analyzer):
4848
)
4949
assert new == correct
5050

51+
5152
# should be non-null on DB with any data
5253
def test_election_display(analyzer):
5354
assert analyzer.display_options("election")

tests/analyzer_tests/test_exports.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ def test_nist_v1(analyzer, tests_path):
3939
new_str_v1 = f"{analyzer.export_nist_v1_json('2020 General', 'Wyoming')}"
4040
correct_str_v1 = open(nist_v1_reference_file, "r").read()
4141

42-
assert len(correct_str_v1) == len(new_str_v1)
42+
assert len(correct_str_v1) == len(new_str_v1)

0 commit comments

Comments
 (0)