Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
austinweisgrau committed Feb 5, 2024
1 parent 2e8d1c9 commit 237693f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
9 changes: 5 additions & 4 deletions parsons/etl/table.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging
import pickle
from enum import Enum
from typing import Type, Union
from typing import Union

import petl

Expand All @@ -13,15 +13,18 @@

DIRECT_INDEX_WARNING_COUNT = 10


class _EmptyDefault(Enum):
"""Default argument for Table()
This is used because Table(None) should not be allowed, but we
need a default argument that isn't the mutable []
See https://stackoverflow.com/a/76606310 for discussion."""

token = 0


_EMPTYDEFAULT = _EmptyDefault.token


Expand All @@ -43,9 +46,7 @@ class Table(ETL, ToFrom):

def __init__(
self,
lst: Union[
list, tuple, petl.util.base.Table, _EmptyDefault
] = _EMPTYDEFAULT,
lst: Union[list, tuple, petl.util.base.Table, _EmptyDefault] = _EMPTYDEFAULT,
):
self.table = None

Expand Down
14 changes: 8 additions & 6 deletions test/test_van/test_ngpvan.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@ def test_get_canvass_responses_input_types(self, m):
@requests_mock.Mocker()
def test_get_canvass_responses_result_codes(self, m):

json = [{
"shortName": "BZ",
"resultCodeId": 18,
"name": "Busy",
"mediumName": "Busy",
}]
json = [
{
"shortName": "BZ",
"resultCodeId": 18,
"name": "Busy",
"mediumName": "Busy",
}
]

m.get(self.van.connection.uri + "canvassResponses/resultCodes", json=json)
assert_matching_tables(
Expand Down

0 comments on commit 237693f

Please sign in to comment.