Skip to content

Commit eec51ee

Browse files
committed
formatting
1 parent 6cb5c78 commit eec51ee

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

db_dtypes/json.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ class JSONArray(pd.api.extensions.ExtensionArray):
102102
def __init__(self, values, dtype=None, copy=False) -> None:
103103
for val in values:
104104
if not isinstance(val, self.dtype.type):
105-
raise TypeError(f"All values must be of type {str(self.dtype.type)}: actual {type(val)}")
105+
raise TypeError(
106+
f"All values must be of type {str(self.dtype.type)}: actual {type(val)}"
107+
)
106108
self.data = values
107109

108110
# Some aliases for common attribute names to ensure pandas supports

tests/compliance/json/conftest.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,22 @@
1515
import collections
1616
from collections import UserDict, abc
1717
import operator
18+
import string
1819
import sys
19-
20-
import numpy as np
21-
import pytest
2220
from typing import TYPE_CHECKING, Any
2321

22+
import numpy as np
2423
import pandas as pd
2524
import pandas._testing as tm
26-
import string
2725
from pandas.tests.extension import base
26+
import pytest
2827

2928
from db_dtypes import JSONArray, JSONDtype
3029

31-
from collections import (
32-
UserDict,
33-
abc,
34-
)
35-
3630
if TYPE_CHECKING:
3731
from collections.abc import Mapping
3832

33+
3934
def make_data():
4035
# TODO: Use a regular dict. See _NDFrameIndexer._setitem_with_indexer
4136
rng = np.random.default_rng(2)
@@ -128,6 +123,7 @@ def data_for_grouping():
128123
]
129124
)
130125

126+
131127
@pytest.fixture
132128
def data_repeated(data):
133129
"""
@@ -153,6 +149,7 @@ def gen(count):
153149

154150
_all_numeric_accumulations = ["cumsum", "cumprod", "cummin", "cummax"]
155151

152+
156153
@pytest.fixture(params=_all_numeric_accumulations)
157154
def all_numeric_accumulations(request):
158155
"""
@@ -203,13 +200,15 @@ def all_arithmetic_operators(request):
203200
"""
204201
return request.param
205202

203+
206204
@pytest.fixture
207205
def na_value():
208206
"""
209207
The scalar missing value for this type. Default 'None'.
210208
"""
211209
return UserDict()
212210

211+
213212
@pytest.fixture(params=["data", "data_missing"])
214213
def all_data(request, data, data_missing):
215214
"""Parametrized fixture returning 'data' or 'data_missing' integer arrays.
@@ -220,4 +219,3 @@ def all_data(request, data, data_missing):
220219
return data
221220
elif request.param == "data_missing":
222221
return data_missing
223-

tests/compliance/json/test_json_compliance.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,14 @@
2222

2323
import collections
2424
import operator
25+
import string
2526
import sys
2627

2728
import numpy as np
28-
import pytest
29-
3029
import pandas as pd
3130
import pandas._testing as tm
32-
import string
3331
from pandas.tests.extension import base
32+
import pytest
3433

3534
from db_dtypes import JSONArray, JSONDtype
3635

0 commit comments

Comments
 (0)