diff --git a/pyproject.toml b/pyproject.toml index 683adaa5fd..3684cafa09 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -284,6 +284,7 @@ exclude = [ # This file needs to be either upgraded or removed and therefore should be # ignore from type checking for now "math_utils\\.py$", + "setup_*.py", ] [tool.ruff.lint] diff --git a/test/website/test_process_notebooks.py b/test/website/test_process_notebooks.py index edad41a46c..5cd6342085 100644 --- a/test/website/test_process_notebooks.py +++ b/test/website/test_process_notebooks.py @@ -7,7 +7,7 @@ import tempfile import textwrap from pathlib import Path -from typing import Generator, Union +from typing import Generator, Optional, Union import pytest @@ -70,7 +70,7 @@ def test_cleanup_tmp_dirs_if_no_metadata() -> None: class TestAddFrontMatterToMetadataMdx: def test_without_metadata_mdx(self) -> None: - front_matter_dict: dict[str, Union[str, Union[list[str] | None]]] = { + front_matter_dict: dict[str, Union[str, Optional[Union[list[str]]]]] = { "title": "some title", "link": "/notebooks/some-title", "description": "some description", @@ -120,7 +120,7 @@ def test_without_metadata_mdx(self) -> None: ) def test_with_metadata_mdx(self) -> None: - front_matter_dict: dict[str, Union[str, Union[list[str] | None]]] = { + front_matter_dict: dict[str, Optional[Union[str, Union[list[str]]]]] = { "title": "some title", "link": "/notebooks/some-title", "description": "some description",