Skip to content

Commit

Permalink
ci: fix PT001 rule inversion conflict
Browse files Browse the repository at this point in the history
See astral-sh/ruff#12106

I've fixed to the new behaviour and disabled the rule
  • Loading branch information
dangotbanned committed Jul 6, 2024
1 parent f33a9cd commit f95be1a
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 10 deletions.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ all = [
]
dev = [
"hatch",
"ruff>=0.3.0",
"ruff>=0.5.0",
"ipython",
"pytest",
"pytest-cov",
Expand Down Expand Up @@ -307,6 +307,7 @@ ignore = [
# suppressible-exception
# https://github.com/vega/altair/pull/3431#discussion_r1629808660
"SIM105",
"PT001",
]

# https://docs.astral.sh/ruff/settings/#lint_unfixable
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/test_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
vlc = None


@pytest.fixture()
@pytest.fixture
def chart():
return (
Chart("cars.json")
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/test_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from altair.utils.html import spec_to_html


@pytest.fixture()
@pytest.fixture
def spec():
return {
"data": {"url": "data.json"},
Expand Down
4 changes: 2 additions & 2 deletions tests/utils/test_mimebundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
vf = None


@pytest.fixture()
@pytest.fixture
def vegalite_spec():
return {
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
Expand All @@ -41,7 +41,7 @@ def vegalite_spec():
}


@pytest.fixture()
@pytest.fixture
def vega_spec():
return {
"$schema": "https://vega.github.io/schema/vega/v5.json",
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/test_schemapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def test_schema_validator_selection():
Draft6Schema.from_dict(dct)


@pytest.fixture()
@pytest.fixture
def dct():
return {
"a": {"foo": "bar"},
Expand Down
2 changes: 1 addition & 1 deletion tests/vegalite/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from altair.vegalite import v5


@pytest.fixture()
@pytest.fixture
def basic_spec():
return {
"data": {"url": "data.csv"},
Expand Down
2 changes: 1 addition & 1 deletion tests/vegalite/v5/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)})

Expand Down
2 changes: 1 addition & 1 deletion tests/vegalite/v5/test_renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
anywidget = None # type: ignore


@pytest.fixture()
@pytest.fixture
def chart():
return alt.Chart("data.csv").mark_point()

Expand Down
2 changes: 1 addition & 1 deletion tests/vegalite/v5/test_theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit f95be1a

Please sign in to comment.