Skip to content

Commit 4f6dd28

Browse files
authored
Merge pull request #2293 from eitanlees/black-formatting
maint: black formatting
2 parents bf5362c + 16ce280 commit 4f6dd28

File tree

6 files changed

+60
-14
lines changed

6 files changed

+60
-14
lines changed

altair/utils/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def pipe(data, *funcs):
232232

233233

234234
def curry(*args, **kwargs):
235-
""" Curry a callable function
235+
"""Curry a callable function
236236
237237
Deprecated: use toolz.curried.curry() instead.
238238
"""

altair/utils/schemapi.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,9 @@ def _passthrough(*args, **kwds):
551551
continue
552552
else:
553553
return self.from_dict(
554-
dct, schema=possible_schema, rootschema=rootschema,
554+
dct,
555+
schema=possible_schema,
556+
rootschema=rootschema,
555557
)
556558

557559
if isinstance(dct, dict):

altair/utils/tests/test_mimebundle.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,5 +183,9 @@ def test_spec_to_vega_mimebundle(vega_spec):
183183

184184

185185
def test_spec_to_json_mimebundle():
186-
bundle = spec_to_mimebundle(spec=vegalite_spec, mode="vega-lite", format="json",)
186+
bundle = spec_to_mimebundle(
187+
spec=vegalite_spec,
188+
mode="vega-lite",
189+
format="json",
190+
)
187191
assert bundle == {"application/json": vegalite_spec}

altair/vegalite/v3/tests/test_api.py

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,15 @@ def _make_chart_type(chart_type):
3838
"color": list("AAAABBBB"),
3939
}
4040
)
41-
base = alt.Chart(data).mark_point().encode(x="x", y="y", color="color",)
41+
base = (
42+
alt.Chart(data)
43+
.mark_point()
44+
.encode(
45+
x="x",
46+
y="y",
47+
color="color",
48+
)
49+
)
4250

4351
if chart_type in ["layer", "hconcat", "vconcat", "concat"]:
4452
func = getattr(alt, chart_type)
@@ -290,7 +298,10 @@ def test_facet_basic():
290298
chart1 = (
291299
alt.Chart("data.csv")
292300
.mark_point()
293-
.encode(x="x:Q", y="y:Q",)
301+
.encode(
302+
x="x:Q",
303+
y="y:Q",
304+
)
294305
.facet("category:N", columns=2)
295306
)
296307

@@ -304,7 +315,10 @@ def test_facet_basic():
304315
chart2 = (
305316
alt.Chart("data.csv")
306317
.mark_point()
307-
.encode(x="x:Q", y="y:Q",)
318+
.encode(
319+
x="x:Q",
320+
y="y:Q",
321+
)
308322
.facet(row="category1:Q", column="category2:Q")
309323
)
310324

@@ -729,7 +743,10 @@ def test_repeat():
729743
chart1 = (
730744
alt.Chart("data.csv")
731745
.mark_point()
732-
.encode(x=alt.X(alt.repeat(), type="quantitative"), y="y:Q",)
746+
.encode(
747+
x=alt.X(alt.repeat(), type="quantitative"),
748+
y="y:Q",
749+
)
733750
.repeat(["A", "B", "C", "D"], columns=2)
734751
)
735752

@@ -856,7 +873,9 @@ def test_layer_errors():
856873
def test_resolve(chart_type):
857874
chart = _make_chart_type(chart_type)
858875
chart = (
859-
chart.resolve_scale(x="independent",)
876+
chart.resolve_scale(
877+
x="independent",
878+
)
860879
.resolve_legend(color="independent")
861880
.resolve_axis(y="independent")
862881
)

altair/vegalite/v4/tests/test_api.py

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,15 @@ def _make_chart_type(chart_type):
3737
"color": list("AAAABBBB"),
3838
}
3939
)
40-
base = alt.Chart(data).mark_point().encode(x="x", y="y", color="color",)
40+
base = (
41+
alt.Chart(data)
42+
.mark_point()
43+
.encode(
44+
x="x",
45+
y="y",
46+
color="color",
47+
)
48+
)
4149

4250
if chart_type in ["layer", "hconcat", "vconcat", "concat"]:
4351
func = getattr(alt, chart_type)
@@ -289,7 +297,10 @@ def test_facet_basic():
289297
chart1 = (
290298
alt.Chart("data.csv")
291299
.mark_point()
292-
.encode(x="x:Q", y="y:Q",)
300+
.encode(
301+
x="x:Q",
302+
y="y:Q",
303+
)
293304
.facet("category:N", columns=2)
294305
)
295306

@@ -303,7 +314,10 @@ def test_facet_basic():
303314
chart2 = (
304315
alt.Chart("data.csv")
305316
.mark_point()
306-
.encode(x="x:Q", y="y:Q",)
317+
.encode(
318+
x="x:Q",
319+
y="y:Q",
320+
)
307321
.facet(row="category1:Q", column="category2:Q")
308322
)
309323

@@ -738,7 +752,10 @@ def test_repeat():
738752
chart1 = (
739753
alt.Chart("data.csv")
740754
.mark_point()
741-
.encode(x=alt.X(alt.repeat(), type="quantitative"), y="y:Q",)
755+
.encode(
756+
x=alt.X(alt.repeat(), type="quantitative"),
757+
y="y:Q",
758+
)
742759
.repeat(["A", "B", "C", "D"], columns=2)
743760
)
744761

@@ -865,7 +882,9 @@ def test_layer_errors():
865882
def test_resolve(chart_type):
866883
chart = _make_chart_type(chart_type)
867884
chart = (
868-
chart.resolve_scale(x="independent",)
885+
chart.resolve_scale(
886+
x="independent",
887+
)
869888
.resolve_legend(color="independent")
870889
.resolve_axis(y="independent")
871890
)

tools/schemapi/schemapi.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,9 @@ def _passthrough(*args, **kwds):
549549
continue
550550
else:
551551
return self.from_dict(
552-
dct, schema=possible_schema, rootschema=rootschema,
552+
dct,
553+
schema=possible_schema,
554+
rootschema=rootschema,
553555
)
554556

555557
if isinstance(dct, dict):

0 commit comments

Comments
 (0)