From d3c5f81d3fba5f716e8f4d8fe67da1e462cb7d14 Mon Sep 17 00:00:00 2001 From: Qbiwan Date: Tue, 1 Dec 2020 00:05:43 +0800 Subject: [PATCH] change dict to literal --- .../plotting/frame/test_frame_subplots.py | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/pandas/tests/plotting/frame/test_frame_subplots.py b/pandas/tests/plotting/frame/test_frame_subplots.py index bb7da2b808da7..427b2c1c3a180 100644 --- a/pandas/tests/plotting/frame/test_frame_subplots.py +++ b/pandas/tests/plotting/frame/test_frame_subplots.py @@ -508,33 +508,33 @@ def test_xlabel_ylabel_dataframe_subplots( "kwargs", [ # stacked center - dict(kind="bar", stacked=True), - dict(kind="bar", stacked=True, width=0.9), - dict(kind="barh", stacked=True), - dict(kind="barh", stacked=True, width=0.9), + {"kind": "bar", "stacked": True}, + {"kind": "bar", "stacked": True, "width": 0.9}, + {"kind": "barh", "stacked": True}, + {"kind": "barh", "stacked": True, "width": 0.9}, # center - dict(kind="bar", stacked=False), - dict(kind="bar", stacked=False, width=0.9), - dict(kind="barh", stacked=False), - dict(kind="barh", stacked=False, width=0.9), + {"kind": "bar", "stacked": False}, + {"kind": "bar", "stacked": False, "width": 0.9}, + {"kind": "barh", "stacked": False}, + {"kind": "barh", "stacked": False, "width": 0.9}, # subplots center - dict(kind="bar", subplots=True), - dict(kind="bar", subplots=True, width=0.9), - dict(kind="barh", subplots=True), - dict(kind="barh", subplots=True, width=0.9), + {"kind": "bar", "subplots": True}, + {"kind": "bar", "subplots": True, "width": 0.9}, + {"kind": "barh", "subplots": True}, + {"kind": "barh", "subplots": True, "width": 0.9}, # align edge - dict(kind="bar", stacked=True, align="edge"), - dict(kind="bar", stacked=True, width=0.9, align="edge"), - dict(kind="barh", stacked=True, align="edge"), - dict(kind="barh", stacked=True, width=0.9, align="edge"), - dict(kind="bar", stacked=False, align="edge"), - dict(kind="bar", stacked=False, width=0.9, align="edge"), - dict(kind="barh", stacked=False, align="edge"), - dict(kind="barh", stacked=False, width=0.9, align="edge"), - dict(kind="bar", subplots=True, align="edge"), - dict(kind="bar", subplots=True, width=0.9, align="edge"), - dict(kind="barh", subplots=True, align="edge"), - dict(kind="barh", subplots=True, width=0.9, align="edge"), + {"kind": "bar", "stacked": True, "align": "edge"}, + {"kind": "bar", "stacked": True, "width": 0.9, "align": "edge"}, + {"kind": "barh", "stacked": True, "align": "edge"}, + {"kind": "barh", "stacked": True, "width": 0.9, "align": "edge"}, + {"kind": "bar", "stacked": False, "align": "edge"}, + {"kind": "bar", "stacked": False, "width": 0.9, "align": "edge"}, + {"kind": "barh", "stacked": False, "align": "edge"}, + {"kind": "barh", "stacked": False, "width": 0.9, "align": "edge"}, + {"kind": "bar", "subplots": True, "align": "edge"}, + {"kind": "bar", "subplots": True, "width": 0.9, "align": "edge"}, + {"kind": "barh", "subplots": True, "align": "edge"}, + {"kind": "barh", "subplots": True, "width": 0.9, "align": "edge"}, ], ) def test_bar_align_multiple_columns(self, kwargs): @@ -545,12 +545,12 @@ def test_bar_align_multiple_columns(self, kwargs): @pytest.mark.parametrize( "kwargs", [ - dict(kind="bar", stacked=False), - dict(kind="bar", stacked=True), - dict(kind="barh", stacked=False), - dict(kind="barh", stacked=True), - dict(kind="bar", subplots=True), - dict(kind="barh", subplots=True), + {"kind": "bar", "stacked": False}, + {"kind": "bar", "stacked": True}, + {"kind": "barh", "stacked": False}, + {"kind": "barh", "stacked": True}, + {"kind": "bar", "subplots": True}, + {"kind": "barh", "subplots": True}, ], ) def test_bar_align_single_column(self, kwargs):