From ceef1d7470c2421a56129f6b43fd64ec071eb3ee Mon Sep 17 00:00:00 2001 From: Tomas Pereira de Vasconcelos Date: Fri, 6 Dec 2024 01:53:50 +0000 Subject: [PATCH 1/5] Improve type annotations and use stricter pyright settings --- .pre-commit-config.yaml | 3 ++- cicd_utils/cicd/compile_plotly_charts.py | 4 +++- cicd_utils/ridgeplot_examples/__init__.py | 5 ++++- docs/conf.py | 2 +- pyrightconfig.json | 15 +++++++++++++++ src/ridgeplot/_color/colorscale.py | 8 ++++++++ src/ridgeplot/_kde.py | 4 ++-- src/ridgeplot/_missing.py | 6 ++++++ src/ridgeplot/_obj/traces/area.py | 7 +++++++ src/ridgeplot/_obj/traces/bar.py | 7 +++++++ tests/e2e/test_examples.py | 4 +++- tests/unit/color/test_interpolation.py | 2 +- tests/unit/test_figure_factory.py | 20 ++++++++++---------- tests/unit/test_utils.py | 4 +++- 14 files changed, 72 insertions(+), 19 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d5e40d79..2349aed7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,6 +10,7 @@ repos: - id: check-ast - id: check-executables-have-shebangs - id: check-json + exclude: ^pyrightconfig\.json$ - id: check-merge-conflict - id: check-shebang-scripts-are-executable - id: check-symlinks @@ -33,7 +34,7 @@ repos: - id: pretty-format-json args: [ --autofix, --no-sort-keys ] # ignore jupyter notebooks - exclude: ^.*\.ipynb$ + exclude: (^.*\.ipynb$|^pyrightconfig\.json$) - id: pretty-format-json args: [ --autofix, --no-sort-keys, --indent=1, --no-ensure-ascii ] # only jupyter notebooks diff --git a/cicd_utils/cicd/compile_plotly_charts.py b/cicd_utils/cicd/compile_plotly_charts.py index f74910b5..c760f6b1 100755 --- a/cicd_utils/cicd/compile_plotly_charts.py +++ b/cicd_utils/cicd/compile_plotly_charts.py @@ -10,7 +10,7 @@ from copy import deepcopy from pathlib import Path -from typing import TYPE_CHECKING, Callable +from typing import TYPE_CHECKING from minify_html import minify from plotly.offline import get_plotlyjs @@ -18,6 +18,8 @@ from ridgeplot_examples import ALL_EXAMPLES, tighten_margins if TYPE_CHECKING: + from collections.abc import Callable + import plotly.graph_objects as go diff --git a/cicd_utils/ridgeplot_examples/__init__.py b/cicd_utils/ridgeplot_examples/__init__.py index b0faf677..bc5128dd 100644 --- a/cicd_utils/ridgeplot_examples/__init__.py +++ b/cicd_utils/ridgeplot_examples/__init__.py @@ -1,9 +1,12 @@ from __future__ import annotations -from typing import Callable +from typing import TYPE_CHECKING import plotly.graph_objects as go +if TYPE_CHECKING: + from collections.abc import Callable + def tighten_margins(fig: go.Figure, px: int = 0) -> go.Figure: """Tighten the margins of a Plotly figure.""" diff --git a/docs/conf.py b/docs/conf.py index d6b8e880..9ca5c140 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -10,7 +10,7 @@ try: import importlib.metadata as importlib_metadata except ImportError: - import importlib_metadata # pyright: ignore[no-redef] + import importlib_metadata try: from cicd.compile_plotly_charts import compile_plotly_charts diff --git a/pyrightconfig.json b/pyrightconfig.json index 52090272..bb178aee 100644 --- a/pyrightconfig.json +++ b/pyrightconfig.json @@ -1,3 +1,4 @@ +// https://microsoft.github.io/pyright/#/configuration { "include": [ "src", @@ -12,7 +13,21 @@ "extraPaths": [ "cicd_utils" ], + "pythonVersion": "3.9", + "pythonPlatform": "All", "typeCheckingMode": "strict", + // stricter settings + "deprecateTypingAliases": true, + "reportMissingModuleSource": "error", + "reportCallInDefaultInitializer": "error", + "reportImplicitOverride": "error", + "reportImportCycles": "error", + "reportMissingSuperCall": "warning", + "reportPropertyTypeMismatch": "error", + "reportShadowedImports": "error", + "reportUninitializedInstanceVariable": "error", + "reportUnnecessaryTypeIgnoreComment": "error", + // turn off some of the strictest settings "reportMissingTypeStubs": "none", "reportUnknownMemberType": "none", "reportUnknownArgumentType": "none", diff --git a/src/ridgeplot/_color/colorscale.py b/src/ridgeplot/_color/colorscale.py index d63b4ce2..149b6801 100644 --- a/src/ridgeplot/_color/colorscale.py +++ b/src/ridgeplot/_color/colorscale.py @@ -1,5 +1,6 @@ from __future__ import annotations +import sys import warnings from typing import TYPE_CHECKING, Any, cast @@ -9,6 +10,11 @@ from ridgeplot._color.utils import default_plotly_template from ridgeplot._types import Color, ColorScale +if sys.version_info >= (3, 12): + from typing import override +else: + from typing_extensions import override + if TYPE_CHECKING: from collections.abc import Collection @@ -18,6 +24,7 @@ def __init__(self) -> None: super().__init__("colorscale", "ridgeplot") @property + @override def named_colorscales(self) -> dict[str, list[str]]: named_colorscales = cast(dict[str, list[str]], super().named_colorscales) if "default" not in named_colorscales: @@ -25,6 +32,7 @@ def named_colorscales(self) -> dict[str, list[str]]: named_colorscales["default"] = px.colors.DEFAULT_PLOTLY_COLORS return named_colorscales + @override def validate_coerce(self, v: Any) -> ColorScale: coerced = super().validate_coerce(v) if coerced is None: # pragma: no cover diff --git a/src/ridgeplot/_kde.py b/src/ridgeplot/_kde.py index 1fafdb21..6acc87bd 100644 --- a/src/ridgeplot/_kde.py +++ b/src/ridgeplot/_kde.py @@ -1,9 +1,9 @@ from __future__ import annotations import sys -from collections.abc import Collection +from collections.abc import Callable, Collection from functools import partial -from typing import TYPE_CHECKING, Any, Callable, Union, cast +from typing import TYPE_CHECKING, Any, Union, cast import numpy as np import numpy.typing as npt diff --git a/src/ridgeplot/_missing.py b/src/ridgeplot/_missing.py index b9e61efb..1dca8b0b 100644 --- a/src/ridgeplot/_missing.py +++ b/src/ridgeplot/_missing.py @@ -9,6 +9,11 @@ else: from typing_extensions import TypeAlias +if sys.version_info >= (3, 12): + from typing import override +else: + from typing_extensions import override + if "_is_loaded" in globals(): raise RuntimeError("Reloading ridgeplot._missing is not allowed") @@ -44,6 +49,7 @@ class _Missing(Enum): MISSING = "MISSING" + @override def __repr__(self) -> str: return "" diff --git a/src/ridgeplot/_obj/traces/area.py b/src/ridgeplot/_obj/traces/area.py index 54e53683..a5b51576 100644 --- a/src/ridgeplot/_obj/traces/area.py +++ b/src/ridgeplot/_obj/traces/area.py @@ -1,5 +1,6 @@ from __future__ import annotations +import sys from typing import Any, ClassVar from plotly import graph_objects as go @@ -9,6 +10,11 @@ from ridgeplot._obj.traces.base import DEFAULT_HOVERTEMPLATE, ColoringContext, RidgeplotTrace from ridgeplot._utils import normalise_min_max +if sys.version_info >= (3, 12): + from typing import override +else: + from typing_extensions import override + class AreaTrace(RidgeplotTrace): _DEFAULT_LINE_WIDTH: ClassVar[float] = 1.5 @@ -49,6 +55,7 @@ def _get_coloring_kwargs(self, ctx: ColoringContext) -> dict[str, Any]: ) return color_kwargs + @override def draw(self, fig: go.Figure, coloring_ctx: ColoringContext) -> go.Figure: # Draw an invisible trace at constance y=y_base so that we # can set fill="tonexty" below and get a filled area plot diff --git a/src/ridgeplot/_obj/traces/bar.py b/src/ridgeplot/_obj/traces/bar.py index ba621e03..66e222a5 100644 --- a/src/ridgeplot/_obj/traces/bar.py +++ b/src/ridgeplot/_obj/traces/bar.py @@ -1,5 +1,6 @@ from __future__ import annotations +import sys from typing import Any, ClassVar from plotly import graph_objects as go @@ -8,6 +9,11 @@ from ridgeplot._obj.traces.base import DEFAULT_HOVERTEMPLATE, ColoringContext, RidgeplotTrace from ridgeplot._utils import normalise_min_max +if sys.version_info >= (3, 12): + from typing import override +else: + from typing_extensions import override + class BarTrace(RidgeplotTrace): _DEFAULT_LINE_WIDTH: ClassVar[float] = 0.5 @@ -33,6 +39,7 @@ def _get_coloring_kwargs(self, ctx: ColoringContext) -> dict[str, Any]: ) return color_kwargs + @override def draw(self, fig: go.Figure, coloring_ctx: ColoringContext) -> go.Figure: fig.add_trace( go.Bar( diff --git a/tests/e2e/test_examples.py b/tests/e2e/test_examples.py index 9ba81dab..f7273a44 100644 --- a/tests/e2e/test_examples.py +++ b/tests/e2e/test_examples.py @@ -1,13 +1,15 @@ from __future__ import annotations from pathlib import Path -from typing import TYPE_CHECKING, Callable +from typing import TYPE_CHECKING import pytest from ridgeplot_examples import ALL_EXAMPLES if TYPE_CHECKING: + from collections.abc import Callable + import plotly.graph_objects as go ROOT_DIR = Path(__file__).parents[2] diff --git a/tests/unit/color/test_interpolation.py b/tests/unit/color/test_interpolation.py index 8f9031aa..4509b6a7 100644 --- a/tests/unit/color/test_interpolation.py +++ b/tests/unit/color/test_interpolation.py @@ -49,7 +49,7 @@ def test_interpolate_color_p_not_in_scale(viridis_colorscale: ColorScale) -> Non @pytest.mark.parametrize("p", [-10.0, -1.3, 1.9, 100.0]) def test_interpolate_color_fails_for_p_out_of_bounds(p: float) -> None: with pytest.raises(ValueError, match="should be a float value between 0 and 1"): - interpolate_color(colorscale=..., p=p) # pyright: ignore[reportArgumentType] + interpolate_color(colorscale=..., p=p) # ============================================================== diff --git a/tests/unit/test_figure_factory.py b/tests/unit/test_figure_factory.py index 43420550..85940dc8 100644 --- a/tests/unit/test_figure_factory.py +++ b/tests/unit/test_figure_factory.py @@ -25,14 +25,14 @@ def test_densities_must_be_4d(self, densities: Densities) -> None: with pytest.raises(ValueError, match="Expected a 4D array of densities"): create_ridgeplot( densities=densities, - trace_types=..., # pyright: ignore[reportArgumentType] - colorscale=..., # pyright: ignore[reportArgumentType] - opacity=..., # pyright: ignore[reportArgumentType] - colormode=..., # pyright: ignore[reportArgumentType] - trace_labels=..., # pyright: ignore[reportArgumentType] - line_color=..., # pyright: ignore[reportArgumentType] - line_width=..., # pyright: ignore[reportArgumentType] - spacing=..., # pyright: ignore[reportArgumentType] - show_yticklabels=..., # pyright: ignore[reportArgumentType] - xpad=..., # pyright: ignore[reportArgumentType] + trace_types=..., + colorscale=..., + opacity=..., + colormode=..., + trace_labels=..., + line_color=..., + line_width=..., + spacing=..., + show_yticklabels=..., + xpad=..., ) diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py index 6d519fdb..6e70a845 100644 --- a/tests/unit/test_utils.py +++ b/tests/unit/test_utils.py @@ -1,7 +1,7 @@ from __future__ import annotations from itertools import product -from typing import TYPE_CHECKING, Callable, TypeVar +from typing import TYPE_CHECKING, TypeVar import numpy as np import pytest @@ -9,6 +9,8 @@ from ridgeplot._utils import get_xy_extrema, normalise_min_max if TYPE_CHECKING: + from collections.abc import Callable + from ridgeplot._types import Densities, DensitiesRow _X = TypeVar("_X") From 5ca3daa77296cefef21e7f1625030cb45735cf88 Mon Sep 17 00:00:00 2001 From: Tomas Pereira de Vasconcelos Date: Fri, 6 Dec 2024 01:55:30 +0000 Subject: [PATCH 2/5] Update changelog.md --- docs/reference/changelog.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/reference/changelog.md b/docs/reference/changelog.md index 651eb4b4..45b7b2ea 100644 --- a/docs/reference/changelog.md +++ b/docs/reference/changelog.md @@ -5,7 +5,9 @@ This document outlines the list of changes to ridgeplot between each release. Fo Unreleased changes ------------------ -- ... +### Internal + +- Improve type annotations and use stricter pyright settings ({gh-pr}`291`) --- From 1373da9c6ba042c1ada16b26b3bb0a32e26a0e1f Mon Sep 17 00:00:00 2001 From: Tomas Pereira de Vasconcelos Date: Fri, 6 Dec 2024 02:00:52 +0000 Subject: [PATCH 3/5] Prefer importing from `typing_extensions` instead of `typing` --- src/ridgeplot/_color/colorscale.py | 9 ++------- src/ridgeplot/_color/css_colors.py | 2 +- src/ridgeplot/_color/interpolation.py | 4 +++- src/ridgeplot/_figure_factory.py | 3 ++- src/ridgeplot/_kde.py | 9 ++------- src/ridgeplot/_missing.py | 14 ++------------ src/ridgeplot/_obj/traces/area.py | 9 ++------- src/ridgeplot/_obj/traces/bar.py | 9 ++------- src/ridgeplot/_obj/traces/base.py | 4 +++- src/ridgeplot/_ridgeplot.py | 2 +- src/ridgeplot/_types.py | 11 +++-------- src/ridgeplot/_utils.py | 7 ++++--- src/ridgeplot/_vendor/more_itertools.py | 4 +++- src/ridgeplot/datasets/__init__.py | 2 +- 14 files changed, 31 insertions(+), 58 deletions(-) diff --git a/src/ridgeplot/_color/colorscale.py b/src/ridgeplot/_color/colorscale.py index 149b6801..1e5fbb12 100644 --- a/src/ridgeplot/_color/colorscale.py +++ b/src/ridgeplot/_color/colorscale.py @@ -1,20 +1,15 @@ from __future__ import annotations -import sys import warnings -from typing import TYPE_CHECKING, Any, cast +from typing import TYPE_CHECKING, cast import plotly.express as px from _plotly_utils.basevalidators import ColorscaleValidator as _ColorscaleValidator +from typing_extensions import Any, override from ridgeplot._color.utils import default_plotly_template from ridgeplot._types import Color, ColorScale -if sys.version_info >= (3, 12): - from typing import override -else: - from typing_extensions import override - if TYPE_CHECKING: from collections.abc import Collection diff --git a/src/ridgeplot/_color/css_colors.py b/src/ridgeplot/_color/css_colors.py index c6a938e8..ef923ab6 100644 --- a/src/ridgeplot/_color/css_colors.py +++ b/src/ridgeplot/_color/css_colors.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Literal +from typing_extensions import Literal # Taken from https://www.w3.org/TR/css-color-3/#svg-color diff --git a/src/ridgeplot/_color/interpolation.py b/src/ridgeplot/_color/interpolation.py index f9376903..4fbb68de 100644 --- a/src/ridgeplot/_color/interpolation.py +++ b/src/ridgeplot/_color/interpolation.py @@ -1,7 +1,9 @@ from __future__ import annotations from dataclasses import dataclass -from typing import TYPE_CHECKING, Literal, Protocol +from typing import TYPE_CHECKING + +from typing_extensions import Literal, Protocol from ridgeplot._color.utils import apply_alpha, round_color, to_rgb, unpack_rgb from ridgeplot._types import CollectionL2, ColorScale diff --git a/src/ridgeplot/_figure_factory.py b/src/ridgeplot/_figure_factory.py index dac0822d..06b2a933 100644 --- a/src/ridgeplot/_figure_factory.py +++ b/src/ridgeplot/_figure_factory.py @@ -1,8 +1,9 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Literal, cast +from typing import TYPE_CHECKING, cast from plotly import graph_objects as go +from typing_extensions import Literal from ridgeplot._color.colorscale import validate_coerce_colorscale from ridgeplot._color.interpolation import ( diff --git a/src/ridgeplot/_kde.py b/src/ridgeplot/_kde.py index 6acc87bd..0e9dfa55 100644 --- a/src/ridgeplot/_kde.py +++ b/src/ridgeplot/_kde.py @@ -1,19 +1,14 @@ from __future__ import annotations -import sys from collections.abc import Callable, Collection from functools import partial -from typing import TYPE_CHECKING, Any, Union, cast +from typing import TYPE_CHECKING, Union, cast import numpy as np import numpy.typing as npt import statsmodels.api as sm from statsmodels.sandbox.nonparametric.kernels import CustomKernel as StatsmodelsKernel - -if sys.version_info >= (3, 13): - from typing import TypeIs -else: - from typing_extensions import TypeIs +from typing_extensions import Any, TypeIs from ridgeplot._types import ( CollectionL1, diff --git a/src/ridgeplot/_missing.py b/src/ridgeplot/_missing.py index 1dca8b0b..63bd50f0 100644 --- a/src/ridgeplot/_missing.py +++ b/src/ridgeplot/_missing.py @@ -1,19 +1,9 @@ from __future__ import annotations -import sys from enum import Enum -from typing import Final, Literal - -if sys.version_info >= (3, 10): - from typing import TypeAlias -else: - from typing_extensions import TypeAlias - -if sys.version_info >= (3, 12): - from typing import override -else: - from typing_extensions import override +from typing import Final +from typing_extensions import Literal, TypeAlias, override if "_is_loaded" in globals(): raise RuntimeError("Reloading ridgeplot._missing is not allowed") diff --git a/src/ridgeplot/_obj/traces/area.py b/src/ridgeplot/_obj/traces/area.py index a5b51576..484dc76d 100644 --- a/src/ridgeplot/_obj/traces/area.py +++ b/src/ridgeplot/_obj/traces/area.py @@ -1,20 +1,15 @@ from __future__ import annotations -import sys -from typing import Any, ClassVar +from typing import ClassVar from plotly import graph_objects as go +from typing_extensions import Any, override from ridgeplot._color.interpolation import slice_colorscale from ridgeplot._color.utils import apply_alpha from ridgeplot._obj.traces.base import DEFAULT_HOVERTEMPLATE, ColoringContext, RidgeplotTrace from ridgeplot._utils import normalise_min_max -if sys.version_info >= (3, 12): - from typing import override -else: - from typing_extensions import override - class AreaTrace(RidgeplotTrace): _DEFAULT_LINE_WIDTH: ClassVar[float] = 1.5 diff --git a/src/ridgeplot/_obj/traces/bar.py b/src/ridgeplot/_obj/traces/bar.py index 66e222a5..9f438f28 100644 --- a/src/ridgeplot/_obj/traces/bar.py +++ b/src/ridgeplot/_obj/traces/bar.py @@ -1,19 +1,14 @@ from __future__ import annotations -import sys -from typing import Any, ClassVar +from typing import ClassVar from plotly import graph_objects as go +from typing_extensions import Any, override from ridgeplot._color.interpolation import interpolate_color from ridgeplot._obj.traces.base import DEFAULT_HOVERTEMPLATE, ColoringContext, RidgeplotTrace from ridgeplot._utils import normalise_min_max -if sys.version_info >= (3, 12): - from typing import override -else: - from typing_extensions import override - class BarTrace(RidgeplotTrace): _DEFAULT_LINE_WIDTH: ClassVar[float] = 0.5 diff --git a/src/ridgeplot/_obj/traces/base.py b/src/ridgeplot/_obj/traces/base.py index b75e26ab..444780d6 100644 --- a/src/ridgeplot/_obj/traces/base.py +++ b/src/ridgeplot/_obj/traces/base.py @@ -2,7 +2,9 @@ from abc import ABC, abstractmethod from dataclasses import dataclass -from typing import TYPE_CHECKING, ClassVar, Literal +from typing import TYPE_CHECKING, ClassVar + +from typing_extensions import Literal from ridgeplot._vendor.more_itertools import zip_strict diff --git a/src/ridgeplot/_ridgeplot.py b/src/ridgeplot/_ridgeplot.py index 02fbf97c..445455df 100644 --- a/src/ridgeplot/_ridgeplot.py +++ b/src/ridgeplot/_ridgeplot.py @@ -16,9 +16,9 @@ if TYPE_CHECKING: from collections.abc import Collection - from typing import Literal import plotly.graph_objects as go + from typing_extensions import Literal from ridgeplot._color.interpolation import SolidColormode from ridgeplot._kde import ( diff --git a/src/ridgeplot/_types.py b/src/ridgeplot/_types.py index e4758b61..035df833 100644 --- a/src/ridgeplot/_types.py +++ b/src/ridgeplot/_types.py @@ -1,15 +1,10 @@ from __future__ import annotations -import sys from collections.abc import Collection -from typing import Any, Literal, Optional, TypeVar, Union +from typing import Optional, Union import numpy as np - -if sys.version_info >= (3, 13): - from typing import TypeIs -else: - from typing_extensions import TypeIs +from typing_extensions import Any, Literal, TypeIs, TypeVar # Snippet used to generate and store the image artefacts: # >>> def save_fig(fig, name): @@ -547,7 +542,7 @@ def is_trace_type(obj: Any) -> TypeIs[TraceType]: >>> is_trace_type(42) False """ - from typing import get_args + from typing_extensions import get_args return isinstance(obj, str) and obj in get_args(TraceType) diff --git a/src/ridgeplot/_utils.py b/src/ridgeplot/_utils.py index 10d116c7..bf1d21db 100644 --- a/src/ridgeplot/_utils.py +++ b/src/ridgeplot/_utils.py @@ -1,13 +1,14 @@ from __future__ import annotations from collections.abc import Collection -from typing import ( - TYPE_CHECKING, +from typing import TYPE_CHECKING + +from typing_extensions import ( TypeVar, ) if TYPE_CHECKING: - from typing import Any + from typing_extensions import Any from ridgeplot._types import CollectionL2, Densities, NormalisationOption, Numeric diff --git a/src/ridgeplot/_vendor/more_itertools.py b/src/ridgeplot/_vendor/more_itertools.py index 3ade1469..3f84251b 100644 --- a/src/ridgeplot/_vendor/more_itertools.py +++ b/src/ridgeplot/_vendor/more_itertools.py @@ -40,7 +40,9 @@ import functools import sys from itertools import zip_longest -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING + +from typing_extensions import Any if TYPE_CHECKING: from collections.abc import Iterable diff --git a/src/ridgeplot/datasets/__init__.py b/src/ridgeplot/datasets/__init__.py index aef71832..1617ed25 100644 --- a/src/ridgeplot/datasets/__init__.py +++ b/src/ridgeplot/datasets/__init__.py @@ -9,7 +9,7 @@ from importlib_resources import as_file, files if TYPE_CHECKING: - from typing import Literal + from typing_extensions import Literal import pandas as pd From 6b5c769e92fe425305875a7de333ebc58467dc9a Mon Sep 17 00:00:00 2001 From: Tomas Pereira de Vasconcelos Date: Fri, 6 Dec 2024 02:03:51 +0000 Subject: [PATCH 4/5] Require `typing-extensions` for all Python versions --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c3b81bed..b9e81296 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ dependencies = [ "numpy>=1", "plotly>=5.20", # The `fillgradient` option was added in 5.20 "statsmodels>=0.12,!=0.14.2", # See GH197 for details - 'typing-extensions; python_version<"3.13"', + "typing-extensions", 'importlib-resources; python_version<"3.10"', ] From 32f88fe075903047d1b50c77cce83dc560bfcef4 Mon Sep 17 00:00:00 2001 From: Tomas Pereira de Vasconcelos Date: Fri, 6 Dec 2024 02:10:44 +0000 Subject: [PATCH 5/5] Update `"include"` --- pyrightconfig.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyrightconfig.json b/pyrightconfig.json index bb178aee..9f6acd4c 100644 --- a/pyrightconfig.json +++ b/pyrightconfig.json @@ -1,10 +1,12 @@ // https://microsoft.github.io/pyright/#/configuration { "include": [ + "cicd_utils", + "docs", + "misc", "src", "tests", - "docs", - "cicd_utils" + "*.py" ], "exclude": [ "docs/build",