From 0af1cd197c604ef2f9264fb6c2162656f4492ef6 Mon Sep 17 00:00:00 2001 From: dangotbanned <125183946+dangotbanned@users.noreply.github.com> Date: Sun, 8 Sep 2024 20:50:35 +0100 Subject: [PATCH] feat: Adds `_config.__all__` --- altair/vegalite/v5/schema/_config.py | 63 ++++++++++++++++++++++++++++ tools/generate_schema_wrapper.py | 3 ++ 2 files changed, 66 insertions(+) diff --git a/altair/vegalite/v5/schema/_config.py b/altair/vegalite/v5/schema/_config.py index 9170276a8..5140b845a 100644 --- a/altair/vegalite/v5/schema/_config.py +++ b/altair/vegalite/v5/schema/_config.py @@ -10,6 +10,69 @@ from ._typing import * # noqa: F403 +__all__ = [ + "AreaConfigKwds", + "AutoSizeParamsKwds", + "AxisConfigKwds", + "BarConfigKwds", + "BindCheckboxKwds", + "BindDirectKwds", + "BindInputKwds", + "BindRadioSelectKwds", + "BindRangeKwds", + "BoxPlotConfigKwds", + "BrushConfigKwds", + "CompositionConfigKwds", + "DateTimeKwds", + "DerivedStreamKwds", + "ErrorBandConfigKwds", + "ErrorBarConfigKwds", + "FeatureGeometryGeoJsonPropertiesKwds", + "FormatConfigKwds", + "GeoJsonFeatureCollectionKwds", + "GeoJsonFeatureKwds", + "GeometryCollectionKwds", + "GradientStopKwds", + "HeaderConfigKwds", + "IntervalSelectionConfigKwds", + "IntervalSelectionConfigWithoutTypeKwds", + "LegendConfigKwds", + "LegendStreamBindingKwds", + "LineConfigKwds", + "LineStringKwds", + "LinearGradientKwds", + "LocaleKwds", + "MarkConfigKwds", + "MergedStreamKwds", + "MultiLineStringKwds", + "MultiPointKwds", + "MultiPolygonKwds", + "NumberLocaleKwds", + "OverlayMarkDefKwds", + "PointKwds", + "PointSelectionConfigKwds", + "PointSelectionConfigWithoutTypeKwds", + "PolygonKwds", + "ProjectionConfigKwds", + "RadialGradientKwds", + "RangeConfigKwds", + "RectConfigKwds", + "ScaleConfigKwds", + "ScaleInvalidDataConfigKwds", + "SelectionConfigKwds", + "StyleConfigIndexKwds", + "ThemeConfig", + "TickConfigKwds", + "TimeIntervalStepKwds", + "TimeLocaleKwds", + "TitleConfigKwds", + "TooltipContentKwds", + "TopLevelSelectionParameterKwds", + "VariableParameterKwds", + "ViewConfigKwds", +] + + class AreaConfigKwds(TypedDict, total=False): """Placeholder doc.""" diff --git a/tools/generate_schema_wrapper.py b/tools/generate_schema_wrapper.py index 93e2ce490..ff2bca60b 100644 --- a/tools/generate_schema_wrapper.py +++ b/tools/generate_schema_wrapper.py @@ -836,6 +836,9 @@ def generate_config_typed_dicts(fp: Path, /) -> Iterator[str]: ) for info in relevant.values() ) + _all = [f"{nm}{KWDS}" for nm in relevant] + _all.append("ThemeConfig") + yield f"__all__ = {_all}\n\n" yield "\n".join(sub_dicts) for prop, prop_info in config.properties.items():