diff --git a/pyproject.toml b/pyproject.toml index 3ddaa278b..2b9dc55f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,7 +66,7 @@ all = [ ] dev = [ "hatch", - "ruff>=0.3.0", + "ruff>=0.5.1", "ipython", "pytest", "pytest-cov", diff --git a/tests/utils/test_compiler.py b/tests/utils/test_compiler.py index 79fc5fed1..0840da4a8 100644 --- a/tests/utils/test_compiler.py +++ b/tests/utils/test_compiler.py @@ -8,7 +8,7 @@ vlc = None -@pytest.fixture() +@pytest.fixture def chart(): return ( Chart("cars.json") diff --git a/tests/utils/test_core.py b/tests/utils/test_core.py index e127885d8..8327d3afe 100644 --- a/tests/utils/test_core.py +++ b/tests/utils/test_core.py @@ -249,7 +249,7 @@ def test_update_nested(): assert output == output2 -@pytest.fixture() +@pytest.fixture def channels(): channels = types.ModuleType("channels") exec(FAKE_CHANNELS_MODULE, channels.__dict__) diff --git a/tests/utils/test_html.py b/tests/utils/test_html.py index faee7b4c8..1ce63445f 100644 --- a/tests/utils/test_html.py +++ b/tests/utils/test_html.py @@ -3,7 +3,7 @@ from altair.utils.html import spec_to_html -@pytest.fixture() +@pytest.fixture def spec(): return { "data": {"url": "data.json"}, diff --git a/tests/utils/test_mimebundle.py b/tests/utils/test_mimebundle.py index a7ab352b0..1d7130f18 100644 --- a/tests/utils/test_mimebundle.py +++ b/tests/utils/test_mimebundle.py @@ -15,7 +15,7 @@ vf = None -@pytest.fixture() +@pytest.fixture def vegalite_spec(): return { "$schema": "https://vega.github.io/schema/vega-lite/v5.json", @@ -41,7 +41,7 @@ def vegalite_spec(): } -@pytest.fixture() +@pytest.fixture def vega_spec(): return { "$schema": "https://vega.github.io/schema/vega/v5.json", diff --git a/tests/utils/test_schemapi.py b/tests/utils/test_schemapi.py index 2fafa43a8..b8af99cc3 100644 --- a/tests/utils/test_schemapi.py +++ b/tests/utils/test_schemapi.py @@ -288,7 +288,7 @@ def test_schema_validator_selection(): Draft6Schema.from_dict(dct) -@pytest.fixture() +@pytest.fixture def dct(): return { "a": {"foo": "bar"}, diff --git a/tests/vegalite/test_common.py b/tests/vegalite/test_common.py index ca99e942a..2c043f47f 100644 --- a/tests/vegalite/test_common.py +++ b/tests/vegalite/test_common.py @@ -7,7 +7,7 @@ from altair.vegalite import v5 -@pytest.fixture() +@pytest.fixture def basic_spec(): return { "data": {"url": "data.csv"}, diff --git a/tests/vegalite/v5/test_api.py b/tests/vegalite/v5/test_api.py index 556bda631..a7197e0b1 100644 --- a/tests/vegalite/v5/test_api.py +++ b/tests/vegalite/v5/test_api.py @@ -64,7 +64,7 @@ def _make_chart_type(chart_type): raise ValueError(msg) -@pytest.fixture() +@pytest.fixture def basic_chart(): data = pd.DataFrame( { diff --git a/tests/vegalite/v5/test_data.py b/tests/vegalite/v5/test_data.py index a2af707fa..5603912f8 100644 --- a/tests/vegalite/v5/test_data.py +++ b/tests/vegalite/v5/test_data.py @@ -6,7 +6,7 @@ from altair.vegalite.v5 import data as alt -@pytest.fixture() +@pytest.fixture def sample_data(): return pd.DataFrame({"x": range(10), "y": range(10)}) diff --git a/tests/vegalite/v5/test_renderers.py b/tests/vegalite/v5/test_renderers.py index a20de1503..b84aa9796 100644 --- a/tests/vegalite/v5/test_renderers.py +++ b/tests/vegalite/v5/test_renderers.py @@ -19,7 +19,7 @@ anywidget = None # type: ignore -@pytest.fixture() +@pytest.fixture def chart(): return alt.Chart("data.csv").mark_point() diff --git a/tests/vegalite/v5/test_theme.py b/tests/vegalite/v5/test_theme.py index 64bb9cf28..0eab5546d 100644 --- a/tests/vegalite/v5/test_theme.py +++ b/tests/vegalite/v5/test_theme.py @@ -4,7 +4,7 @@ from altair.vegalite.v5.theme import VEGA_THEMES -@pytest.fixture() +@pytest.fixture def chart(): return alt.Chart("data.csv").mark_bar().encode(x="x:Q")