internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: vega/altair

Issue:
Dots aren't showing up in ranged dot plot
![Screenshot from 2022-06-30 20-02-14](https://user-images.githubusercontent.com/9993/176815294-a1801b76-ed5a-4f3c-b38f-71850c131a5a.png)



Discussion:

Resolving patch:
diff --git a/altair/examples/ranged_dot_plot.py b/altair/examples/ranged_dot_plot.py
--- a/altair/examples/ranged_dot_plot.py
+++ b/altair/examples/ranged_dot_plot.py
@@ -1,7 +1,7 @@
 """
 Ranged Dot Plot
------------------
-This example shows a ranged dot plot that uses 'layer' to convey changing life expectancy for the five most populous countries (between 1955 and 2000).
+---------------
+This example shows a ranged dot plot to convey changing life expectancy for the five most populous countries (between 1955 and 2000).
 """
 # category: other charts
 import altair as alt
@@ -9,7 +9,7 @@
 
 source = data.countries.url
 
-chart = alt.layer(
+chart = alt.Chart(
     data=source
 ).transform_filter(
     filter={"field": 'country',
@@ -19,13 +19,13 @@
             "oneOf": [1955, 2000]}
 )
 
-chart += alt.Chart().mark_line(color='#db646f').encode(
+line = chart.mark_line(color='#db646f').encode(
     x='life_expect:Q',
     y='country:N',
     detail='country:N'
 )
 # Add points for life expectancy in 1955 & 2000
-chart += alt.Chart().mark_point(
+points = chart.mark_point(
     size=100,
     opacity=1,
     filled=True
@@ -34,10 +34,10 @@
     y='country:N',
     color=alt.Color('year:O',
         scale=alt.Scale(
-            domain=['1955', '2000'],
+            domain=[1955, 2000],
             range=['#e6959c', '#911a24']
         )
     )
 ).interactive()
 
-chart
+(line + points)


Test patch:
Repository: vega/altair

Issue:
x-axis tick labels in Natural Disasters case study need clean up
See:

![Screenshot from 2022-06-30 14-20-48](https://user-images.githubusercontent.com/9993/176780327-c5f2ee5d-69e8-46fe-8bb2-89e7e3843e7a.png)



Discussion:

Resolving patch:
diff --git a/altair/examples/natural_disasters.py b/altair/examples/natural_disasters.py
--- a/altair/examples/natural_disasters.py
+++ b/altair/examples/natural_disasters.py
@@ -1,7 +1,7 @@
 """
-Natural Disasters
------------------
-This example shows a visualization of global deaths from natural disasters.
+Global Deaths from Natural Disasters
+------------------------------------
+This example shows a proportional symbols visualization of deaths from natural disasters by year and type.
 """
 # category: case studies
 import altair as alt
@@ -9,21 +9,44 @@
 
 source = data.disasters.url
 
-alt.Chart(source).mark_circle(
+alt.Chart(source).transform_filter(
+    alt.datum.Entity != 'All natural disasters'
+).mark_circle(
     opacity=0.8,
     stroke='black',
-    strokeWidth=1
+    strokeWidth=1,
+    strokeOpacity=0.4
 ).encode(
-    alt.X('Year:O', axis=alt.Axis(labelAngle=0)),
-    alt.Y('Entity:N'),
-    alt.Size('Deaths:Q',
-        scale=alt.Scale(range=[0, 4000]),
-        legend=alt.Legend(title='Annual Global Deaths')
+    x=alt.X('Year:T', title=None, scale=alt.Scale(domain=['1899','2018'])),
+    y=alt.Y(
+        'Entity:N',
+        sort=alt.EncodingSortField(field="Deaths", op="sum", order='descending'),
+        title=None
+    ),
+    size=alt.Size('Deaths:Q',
+        scale=alt.Scale(range=[0, 2500]),
+        legend=alt.Legend(title='Deaths', clipHeight=30, format='s')
     ),
-    alt.Color('Entity:N', legend=None)
+    color=alt.Color('Entity:N', legend=None),
+    tooltip=[
+        "Entity:N", 
+        alt.Tooltip("Year:T", format='%Y'), 
+        alt.Tooltip("Deaths:Q", format='~s')
+    ],
 ).properties(
     width=450,
-    height=320
-).transform_filter(
-    alt.datum.Entity != 'All natural disasters'
+    height=320,
+    title=alt.TitleParams(
+        text="Global Deaths from Natural Disasters (1900-2017)",
+        subtitle="The size of the bubble represents the total death count per year, by type of disaster",
+        anchor='start'
+    )
+).configure_axisY(
+    domain=False,
+    ticks=False,
+    offset=10
+).configure_axisX(
+    grid=False,
+).configure_view(
+    stroke=None
 )


Test patch:
Repository: vega/altair

Issue:
Reverting `UndefinedLike`?
In https://github.com/altair-viz/altair/pull/2681, we have merged the pull request that
```python
UndefinedLike = Any
Undefined: UndefinedLike = UndefinedType()
```
But the result now is that the docsctrings looks like this:
![image](https://user-images.githubusercontent.com/5186265/201956180-e17a41f2-3ca1-4a93-a42a-58c0cb02f806.png)

I do not think we favor this behavior. Maybe https://github.com/altair-viz/altair/pull/2670 was sufficient already?
```python
Undefined: Any = UndefinedType()
```
Or will this make the docstrings look like: `data: Undefined = Any, encoding: Undefined = Any, etc`?


Discussion:
I agree that the current docstring with ` UndefinedLike = Undefined` is not very readable and would be in favor of changing it. I am not sure about what is the best way to change it and what effect that has for IDEs using typehints.

Resolving patch:
diff --git a/altair/utils/schemapi.py b/altair/utils/schemapi.py
--- a/altair/utils/schemapi.py
+++ b/altair/utils/schemapi.py
@@ -142,10 +142,7 @@ def __repr__(self):
 # But for now, we'll add an annotation to indicate that the type checker
 # should permit any value passed to a function argument whose default
 # value is Undefined.
-UndefinedLike = Any
-
-
-Undefined: UndefinedLike = UndefinedType()
+Undefined: Any = UndefinedType()
 
 
 class SchemaBase(object):
diff --git a/tools/schemapi/schemapi.py b/tools/schemapi/schemapi.py
--- a/tools/schemapi/schemapi.py
+++ b/tools/schemapi/schemapi.py
@@ -140,10 +140,7 @@ def __repr__(self):
 # But for now, we'll add an annotation to indicate that the type checker
 # should permit any value passed to a function argument whose default
 # value is Undefined.
-UndefinedLike = Any
-
-
-Undefined: UndefinedLike = UndefinedType()
+Undefined: Any = UndefinedType()
 
 
 class SchemaBase(object):


Test patch:
Repository: vega/altair

Issue:
Issue: type object 'Draft7Validator' has no attribute 'FORMAT_CHECKER'
Came here because I found this error when running Great Expectations and it seems that the issue occurred in v4.2.1. 

I haven't verified this yet but it seems that `jsonschema.Draft7Validator` only has `FORMAT_CHECKER` attribute since jsonschema >= v4.3.0 so perhaps the requirements file in this module needs to be updated?




Discussion:
Thanks for reporting the bug! Indeed, a quick fix for anyone affected is to upgrade jsonschema.

```bash
pip install jsonschema --upgrade
```

@mattijn @joelostblom This is an urgent one. I already fixed it in #2812 but that PR never made its way into the 4.2.1 release. Probably because the PR was actually about something else and I just fixed this backwards compatibility issue on the side. Sorry for that! Should have kept these PRs better separated and spot it while reviewing #2844. I can't get in front of a laptop right now but I can create a PR against `v4.2.X` branch this evening for a `v4.2.2`release.

Resolving patch:
diff --git a/altair/utils/schemapi.py b/altair/utils/schemapi.py
--- a/altair/utils/schemapi.py
+++ b/altair/utils/schemapi.py
@@ -50,9 +50,10 @@ def validate_jsonschema(spec, schema, resolver=None):
     # e.g. '#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,
     # (Gradient|string|null)>' would be a valid $ref in a Vega-Lite schema but
     # it is not a valid URI reference due to the characters such as '<'.
-    validator = JSONSCHEMA_VALIDATOR(
-        schema, format_checker=JSONSCHEMA_VALIDATOR.FORMAT_CHECKER, resolver=resolver
-    )
+    validator_kwargs = {"resolver": resolver}
+    if hasattr(JSONSCHEMA_VALIDATOR, "FORMAT_CHECKER"):
+        validator_kwargs["format_checker"] = JSONSCHEMA_VALIDATOR.FORMAT_CHECKER
+    validator = JSONSCHEMA_VALIDATOR(schema, **validator_kwargs)
     error = jsonschema.exceptions.best_match(validator.iter_errors(spec))
     if error is not None:
         raise error
diff --git a/tools/schemapi/schemapi.py b/tools/schemapi/schemapi.py
--- a/tools/schemapi/schemapi.py
+++ b/tools/schemapi/schemapi.py
@@ -48,9 +48,10 @@ def validate_jsonschema(spec, schema, resolver=None):
     # e.g. '#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,
     # (Gradient|string|null)>' would be a valid $ref in a Vega-Lite schema but
     # it is not a valid URI reference due to the characters such as '<'.
-    validator = JSONSCHEMA_VALIDATOR(
-        schema, format_checker=JSONSCHEMA_VALIDATOR.FORMAT_CHECKER, resolver=resolver
-    )
+    validator_kwargs = {"resolver": resolver}
+    if hasattr(JSONSCHEMA_VALIDATOR, "FORMAT_CHECKER"):
+        validator_kwargs["format_checker"] = JSONSCHEMA_VALIDATOR.FORMAT_CHECKER
+    validator = JSONSCHEMA_VALIDATOR(schema, **validator_kwargs)
     error = jsonschema.exceptions.best_match(validator.iter_errors(spec))
     if error is not None:
         raise error


Test patch:
Repository: vega/altair

Issue:
ga: `DeprecationWarning`: SelectableGroups dict interface is deprecated. Use select.
I see the following deprecation warning in our tests:
```cmd
tests/vegalite/v5/tests/test_display.py::test_check_renderer_options
[51](https://github.com/altair-viz/altair/actions/runs/4210647283/jobs/7308470442#step:5:52)
  /home/runner/work/altair/altair/altair/utils/plugin_registry.py:124: 
DeprecationWarning: SelectableGroups dict interface is deprecated. Use select.

[52](https://github.com/altair-viz/altair/actions/runs/4210647283/jobs/7308470442#step:5:53)

    more_exts = [ep.name for ep in entry_points().get(self.entry_point_group, [])]
```
It is around here in the code: https://github.com/altair-viz/altair/blob/master/altair/utils/plugin_registry.py#L124


Discussion:

Resolving patch:
diff --git a/altair/utils/plugin_registry.py b/altair/utils/plugin_registry.py
--- a/altair/utils/plugin_registry.py
+++ b/altair/utils/plugin_registry.py
@@ -1,3 +1,4 @@
+import sys
 from typing import Any, Dict, List, Optional, Generic, TypeVar, cast
 from types import TracebackType
 
@@ -121,7 +122,11 @@ def register(self, name: str, value: Optional[PluginType]) -> Optional[PluginTyp
     def names(self) -> List[str]:
         """List the names of the registered and entry points plugins."""
         exts = list(self._plugins.keys())
-        more_exts = [ep.name for ep in entry_points().get(self.entry_point_group, [])]
+        if sys.version_info.major == 3 and sys.version_info.minor < 10:
+            e_points = entry_points().get(self.entry_point_group, [])
+        else:
+            e_points = entry_points(group=self.entry_point_group)
+        more_exts = [ep.name for ep in e_points]
         exts.extend(more_exts)
         return sorted(set(exts))
 


Test patch:
Repository: vega/altair

Issue:
`TypeError: 'GetAttrExpression' object is not callable` with `interval.ref()`
Thanks for the wonderful library!

Using the previous version `4.2.2`, everything works fine, but with `5.0.0`, the following code produces the error shown:

```python
interval = alt.selection_interval(encodings=["x"])
interval.ref()

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[10], line 2
      1 interval = alt.selection_interval(encodings=["x"])
----> 2 interval.ref()

TypeError: 'GetAttrExpression' object is not callable
```


Discussion:

Resolving patch:
diff --git a/altair/vegalite/v5/api.py b/altair/vegalite/v5/api.py
--- a/altair/vegalite/v5/api.py
+++ b/altair/vegalite/v5/api.py
@@ -191,6 +191,13 @@ def __init__(self, name):
             name = self._get_name()
         self.name = name
 
+    @utils.deprecation.deprecated(
+        message="'ref' is deprecated. No need to call '.ref()' anymore."
+    )
+    def ref(self):
+        "'ref' is deprecated. No need to call '.ref()' anymore."
+        return self.to_dict()
+
     def to_dict(self):
         if self.param_type == "variable":
             return {"expr": self.name}
diff --git a/doc/conf.py b/doc/conf.py
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -78,7 +78,7 @@
 # The short X.Y version.
 version = "5.1.0"
 # The full version, including alpha/beta/rc tags.
-release = f"{version}dev"
+release = f"{version}"
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.


Test patch:
Repository: vega/altair

Issue:
Include a suggestion to update frontend (Jupyterlab, ...) in mimetype error
Follow-up that comes out of #2585. Raised by @joelostblom:

> do you think we need to communicate the minimum version of JuptyerLab that support Altair 5 somewhere? I am thinking ideally directly in the error message if possible, but otherwise at least in the docs and release notes, what do you all think?


Discussion:
I would had appreciated any hint here as it took me an hour to figure out why my chart's weren't working anymore.
By the way i used in my jupyter notebook the `alt.renderers.enable('jupyterlab')` until today which worked just fine, now i had to switch to `alt.renderers.enable('default')`, no plan what you changed there.

Resolving patch:
diff --git a/altair/vegalite/v5/display.py b/altair/vegalite/v5/display.py
--- a/altair/vegalite/v5/display.py
+++ b/altair/vegalite/v5/display.py
@@ -28,8 +28,8 @@
 ENTRY_POINT_GROUP = "altair.vegalite.v5.renderer"  # type: str
 
 # The display message when rendering fails
-DEFAULT_DISPLAY = """\
-<VegaLite 5 object>
+DEFAULT_DISPLAY = f"""\
+<VegaLite {VEGALITE_VERSION.split('.')[0]} object>
 
 If you see this message, it means the renderer has not been properly enabled
 for the frontend that you are using. For more information, see


Test patch:
Repository: vega/altair

Issue:
pkg_resources is deprecated
It's used in `import_pyarrow_interchange` in `data.py`. Currently generates this deprecation warning in our CI

```python
../../../../Application Support/hatch/env/virtual/altair/Ac6cCVwn/altair/lib/python3.10/site-packages/pkg_resources/__init__.py:121
  /Users/stefanbinder/Library/Application Support/hatch/env/virtual/altair/Ac6cCVwn/altair/lib/python3.10/site-packages/pkg_resources/__init__.py:121: DeprecationWarning: pkg_resources is deprecated as an API
    warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning)
```
We can replace `pkg_resources` with the `packaging` package and which I introduce in #3118 anyway and `importlib.metadata`. This is also the recommended way to do it in https://setuptools.pypa.io/en/latest/pkg_resources.html. I can look at this.


Discussion:

Resolving patch:
diff --git a/altair/utils/data.py b/altair/utils/data.py
--- a/altair/utils/data.py
+++ b/altair/utils/data.py
@@ -3,12 +3,14 @@
 import random
 import hashlib
 import warnings
+from importlib.metadata import version as importlib_version, PackageNotFoundError
 from typing import Union, MutableMapping, Optional, Dict, Sequence, TYPE_CHECKING, List
 from types import ModuleType
 
 import pandas as pd
 from toolz import curried
 from typing import TypeVar
+from packaging.version import Version
 
 from .core import sanitize_dataframe, sanitize_arrow_table, _DataFrameLike
 from .core import sanitize_geo_interface
@@ -349,25 +351,23 @@ def curry(*args, **kwargs):
 
 
 def import_pyarrow_interchange() -> ModuleType:
-    import pkg_resources
-
     try:
-        pkg_resources.require("pyarrow>=11.0.0")
-        # The package is installed and meets the minimum version requirement
-        import pyarrow.interchange as pi
-
-        return pi
-    except pkg_resources.DistributionNotFound as err:
-        # The package is not installed
-        raise ImportError(
-            "Usage of the DataFrame Interchange Protocol requires the package 'pyarrow', but it is not installed."
-        ) from err
-    except pkg_resources.VersionConflict as err:
-        # The package is installed but does not meet the minimum version requirement
+        pyarrow_version_str = importlib_version("pyarrow")
+    except PackageNotFoundError as err:
         raise ImportError(
-            "The installed version of 'pyarrow' does not meet the minimum requirement of version 11.0.0. "
-            "Please update 'pyarrow' to use the DataFrame Interchange Protocol."
+            "Usage of the DataFrame Interchange Protocol requires the package"
+            + " 'pyarrow', but it is not installed."
         ) from err
+    else:
+        if Version(pyarrow_version_str) < Version("11.0.0"):
+            raise ImportError(
+                "The installed version of 'pyarrow' does not meet the minimum requirement of version 11.0.0. "
+                "Please update 'pyarrow' to use the DataFrame Interchange Protocol."
+            )
+        else:
+            import pyarrow.interchange as pi
+
+            return pi
 
 
 def pyarrow_available() -> bool:


Test patch:
Repository: vega/altair

Issue:
`sanitize_dataframe` utilizes deprecated Pandas `convert_dtype` param
This particular utility function uses a deprecated Pandas codepath: https://github.com/altair-viz/altair/blob/ec13a671d53419f371b629d449f719240d1f1756/altair/utils/core.py#L410C1-L410C76

As this emits a `FutureWarning` and will eventually be removed, could it be replaced with the suggestion?

```
FutureWarning: the convert_dtype parameter is deprecated and will be removed in a future version.  Do ``ser.astype(object).apply()`` instead if you want ``convert_dtype=False``.
```

Versions: Altair 4.2.2 and Pandas 2.1.0
OS: Darwin 22.6.0


Discussion:
Thanks for reporting this @cdkini. Makes sense, I'll look into it. 

For my own reference, it's deprecated since [version 2.1](https://pandas.pydata.org/docs/whatsnew/v2.1.0.html#deprecations) (search for `convert_type`)

Resolving patch:
diff --git a/altair/utils/core.py b/altair/utils/core.py
--- a/altair/utils/core.py
+++ b/altair/utils/core.py
@@ -407,7 +407,7 @@ def to_list_if_array(val):
         elif dtype == object:
             # Convert numpy arrays saved as objects to lists
             # Arrays are not JSON serializable
-            col = df[col_name].apply(to_list_if_array, convert_dtype=False)
+            col = df[col_name].astype(object).apply(to_list_if_array)
             df[col_name] = col.where(col.notnull(), None)
     return df
 


Test patch:
Repository: vega/altair

Issue:
Boxplot not working with MarkDef
Hi,

I noticed that specifying a boxplot through MarkDef doesn't work, even though the docs state it should. Tested with Altair 4.2.0 and 4.1.0. Using `mark_boxplot` works OK for me.

Example:
```
import pandas as pd
df = pd.DataFrame({
    'foo': [1,1,2,2,2,2,3,4,4,5]
})

# works 
import altair as alt
alt.Chart(df).mark_boxplot().encode(y='foo')

# fails
import altair as alt
alt.Chart(df, mark=alt.MarkDef(type='boxplot')).encode(y='foo')
```

This fails with 
```
SchemaValidationError: Invalid specification

        altair.vegalite.v4.schema.core.MarkDef->type, validating 'enum'

        'boxplot' is not one of ['arc', 'area', 'bar', 'image', 'line', 'point', 'rect', 'rule', 'text', 'tick', 'trail', 'circle', 'square', 'geoshape']
```




Discussion:
Can you point to the incorrect documentation?
The generated docs from vega-lite https://altair-viz.github.io/user_guide/generated/core/altair.MarkDef.html
say:

> This could a primitive mark type (one of "bar", "circle", "square", "tick", "line", "area", "point", "geoshape", "rule", and "text" ) or a composite mark type ( "boxplot", "errorband", "errorbar" )" 

Resolving patch:
diff --git a/altair/vegalite/v5/api.py b/altair/vegalite/v5/api.py
--- a/altair/vegalite/v5/api.py
+++ b/altair/vegalite/v5/api.py
@@ -2830,9 +2830,10 @@ class Chart(
     data : Data
         An object describing the data source
     mark : AnyMark
-        A string describing the mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`,
-         `"line"`, * `"area"`, `"point"`, `"rule"`, `"geoshape"`, and `"text"`) or a
-         MarkDef object.
+        A `MarkDef` or `CompositeMarkDef` object, or a string describing the mark type
+        (one of `"arc"`, `"area"`, `"bar"`, `"circle"`, `"geoshape"`, `"image"`,
+        `"line"`, `"point"`, `"rule"`, `"rect"`, `"square"`, `"text"`, `"tick"`,
+        `"trail"`, `"boxplot"`, `"errorband"`, and `"errorbar"`).
     encoding : FacetedEncoding
         A key-value mapping between encoding channels and definition of fields.
     autosize : anyOf(AutosizeType, AutoSizeParams)


Test patch:
Repository: vega/altair

Issue:
Verify versions of both VegaFusion packages
See https://github.com/altair-viz/altair/pull/3281#issuecomment-1867599879

We should check the version of `vegafusion-python-embed` as well as the version of `vegafusion` since it's possible for these to get out of sync.




Discussion:

Resolving patch:
diff --git a/altair/utils/_importers.py b/altair/utils/_importers.py
--- a/altair/utils/_importers.py
+++ b/altair/utils/_importers.py
@@ -7,10 +7,14 @@ def import_vegafusion() -> ModuleType:
     min_version = "1.5.0"
     try:
         version = importlib_version("vegafusion")
-        if Version(version) < Version(min_version):
+        embed_version = importlib_version("vegafusion-python-embed")
+        if version != embed_version or Version(version) < Version(min_version):
             raise RuntimeError(
-                f"The vegafusion package must be version {min_version} or greater. "
-                f"Found version {version}"
+                "The versions of the vegafusion and vegafusion-python-embed packages must match\n"
+                f"and must be version {min_version} or greater.\n"
+                f"Found:\n"
+                f" - vegafusion=={version}\n"
+                f" - vegafusion-python-embed=={embed_version}\n"
             )
         import vegafusion as vf  # type: ignore
 


Test patch:
Repository: vega/altair

Issue:
type hint for to_json(indent=) should be Optional
In https://github.com/altair-viz/altair/pull/3071 and https://github.com/altair-viz/altair/pull/3073 types were added to some `to_json()` methods (well, #3071 added the method entirely to `TopLevelMixin`) that specify `indent` as an `int`. In these, `indent` is only passed along to `json.dumps`, where it should be possible to pass `None` or a string as well: https://docs.python.org/3/library/json.html#json.dump

With `indent` typed as `int` and defaulting to 2 in the altair API, there is no way to get the compact `indent=None` serialization in a way that typechecks.

I think the types should be relaxed to `str | int | None` or something similar.


Discussion:

Resolving patch:
diff --git a/altair/utils/schemapi.py b/altair/utils/schemapi.py
--- a/altair/utils/schemapi.py
+++ b/altair/utils/schemapi.py
@@ -982,7 +982,7 @@ def to_dict(
     def to_json(
         self,
         validate: bool = True,
-        indent: int = 2,
+        indent: Optional[Union[int, str]] = 2,
         sort_keys: bool = True,
         *,
         ignore: Optional[List[str]] = None,
diff --git a/altair/vegalite/v5/api.py b/altair/vegalite/v5/api.py
--- a/altair/vegalite/v5/api.py
+++ b/altair/vegalite/v5/api.py
@@ -1003,7 +1003,7 @@ def to_dict(
     def to_json(
         self,
         validate: bool = True,
-        indent: int = 2,
+        indent: Optional[Union[int, str]] = 2,
         sort_keys: bool = True,
         *,
         format: str = "vega-lite",
diff --git a/tools/schemapi/schemapi.py b/tools/schemapi/schemapi.py
--- a/tools/schemapi/schemapi.py
+++ b/tools/schemapi/schemapi.py
@@ -980,7 +980,7 @@ def to_dict(
     def to_json(
         self,
         validate: bool = True,
-        indent: int = 2,
+        indent: Optional[Union[int, str]] = 2,
         sort_keys: bool = True,
         *,
         ignore: Optional[List[str]] = None,


Test patch: