Skip to content

Commit

Permalink
Merge pull request #2293 from eitanlees/black-formatting
Browse files Browse the repository at this point in the history
maint: black formatting
  • Loading branch information
jakevdp authored Sep 17, 2020
2 parents bf5362c + 16ce280 commit 4f6dd28
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 14 deletions.
2 changes: 1 addition & 1 deletion altair/utils/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def pipe(data, *funcs):


def curry(*args, **kwargs):
""" Curry a callable function
"""Curry a callable function
Deprecated: use toolz.curried.curry() instead.
"""
Expand Down
4 changes: 3 additions & 1 deletion altair/utils/schemapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,9 @@ def _passthrough(*args, **kwds):
continue
else:
return self.from_dict(
dct, schema=possible_schema, rootschema=rootschema,
dct,
schema=possible_schema,
rootschema=rootschema,
)

if isinstance(dct, dict):
Expand Down
6 changes: 5 additions & 1 deletion altair/utils/tests/test_mimebundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,5 +183,9 @@ def test_spec_to_vega_mimebundle(vega_spec):


def test_spec_to_json_mimebundle():
bundle = spec_to_mimebundle(spec=vegalite_spec, mode="vega-lite", format="json",)
bundle = spec_to_mimebundle(
spec=vegalite_spec,
mode="vega-lite",
format="json",
)
assert bundle == {"application/json": vegalite_spec}
29 changes: 24 additions & 5 deletions altair/vegalite/v3/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,15 @@ def _make_chart_type(chart_type):
"color": list("AAAABBBB"),
}
)
base = alt.Chart(data).mark_point().encode(x="x", y="y", color="color",)
base = (
alt.Chart(data)
.mark_point()
.encode(
x="x",
y="y",
color="color",
)
)

if chart_type in ["layer", "hconcat", "vconcat", "concat"]:
func = getattr(alt, chart_type)
Expand Down Expand Up @@ -290,7 +298,10 @@ def test_facet_basic():
chart1 = (
alt.Chart("data.csv")
.mark_point()
.encode(x="x:Q", y="y:Q",)
.encode(
x="x:Q",
y="y:Q",
)
.facet("category:N", columns=2)
)

Expand All @@ -304,7 +315,10 @@ def test_facet_basic():
chart2 = (
alt.Chart("data.csv")
.mark_point()
.encode(x="x:Q", y="y:Q",)
.encode(
x="x:Q",
y="y:Q",
)
.facet(row="category1:Q", column="category2:Q")
)

Expand Down Expand Up @@ -729,7 +743,10 @@ def test_repeat():
chart1 = (
alt.Chart("data.csv")
.mark_point()
.encode(x=alt.X(alt.repeat(), type="quantitative"), y="y:Q",)
.encode(
x=alt.X(alt.repeat(), type="quantitative"),
y="y:Q",
)
.repeat(["A", "B", "C", "D"], columns=2)
)

Expand Down Expand Up @@ -856,7 +873,9 @@ def test_layer_errors():
def test_resolve(chart_type):
chart = _make_chart_type(chart_type)
chart = (
chart.resolve_scale(x="independent",)
chart.resolve_scale(
x="independent",
)
.resolve_legend(color="independent")
.resolve_axis(y="independent")
)
Expand Down
29 changes: 24 additions & 5 deletions altair/vegalite/v4/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,15 @@ def _make_chart_type(chart_type):
"color": list("AAAABBBB"),
}
)
base = alt.Chart(data).mark_point().encode(x="x", y="y", color="color",)
base = (
alt.Chart(data)
.mark_point()
.encode(
x="x",
y="y",
color="color",
)
)

if chart_type in ["layer", "hconcat", "vconcat", "concat"]:
func = getattr(alt, chart_type)
Expand Down Expand Up @@ -289,7 +297,10 @@ def test_facet_basic():
chart1 = (
alt.Chart("data.csv")
.mark_point()
.encode(x="x:Q", y="y:Q",)
.encode(
x="x:Q",
y="y:Q",
)
.facet("category:N", columns=2)
)

Expand All @@ -303,7 +314,10 @@ def test_facet_basic():
chart2 = (
alt.Chart("data.csv")
.mark_point()
.encode(x="x:Q", y="y:Q",)
.encode(
x="x:Q",
y="y:Q",
)
.facet(row="category1:Q", column="category2:Q")
)

Expand Down Expand Up @@ -738,7 +752,10 @@ def test_repeat():
chart1 = (
alt.Chart("data.csv")
.mark_point()
.encode(x=alt.X(alt.repeat(), type="quantitative"), y="y:Q",)
.encode(
x=alt.X(alt.repeat(), type="quantitative"),
y="y:Q",
)
.repeat(["A", "B", "C", "D"], columns=2)
)

Expand Down Expand Up @@ -865,7 +882,9 @@ def test_layer_errors():
def test_resolve(chart_type):
chart = _make_chart_type(chart_type)
chart = (
chart.resolve_scale(x="independent",)
chart.resolve_scale(
x="independent",
)
.resolve_legend(color="independent")
.resolve_axis(y="independent")
)
Expand Down
4 changes: 3 additions & 1 deletion tools/schemapi/schemapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,9 @@ def _passthrough(*args, **kwds):
continue
else:
return self.from_dict(
dct, schema=possible_schema, rootschema=rootschema,
dct,
schema=possible_schema,
rootschema=rootschema,
)

if isinstance(dct, dict):
Expand Down

0 comments on commit 4f6dd28

Please sign in to comment.