From 35c4a87f053ab0a3adfe8e73202db452fb71a9ca Mon Sep 17 00:00:00 2001 From: Ninette Adhikari Date: Wed, 28 Aug 2024 16:17:52 +0200 Subject: [PATCH] fix: Add type fixes --- conda_smithy/linter/lints.py | 4 ++-- conda_smithy/schema.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conda_smithy/linter/lints.py b/conda_smithy/linter/lints.py index 48040d0a9..77c3be87a 100644 --- a/conda_smithy/linter/lints.py +++ b/conda_smithy/linter/lints.py @@ -2,7 +2,7 @@ import os import re from collections.abc import Sequence -from typing import Any, Dict, List, Literal, Optional +from typing import Any, Dict, List, Literal, Optional, Union from conda.exceptions import InvalidVersionSpec from conda.models.version import VersionOrder @@ -44,7 +44,7 @@ def lint_section_order( section_order_sorted = sorted(major_sections, key=order.index) if major_sections != section_order_sorted: - section_order_sorted_str: str | map[str] = map( + section_order_sorted_str: Union[str, map[str]] = map( lambda s: f"'{s}'", section_order_sorted ) section_order_sorted_str = ", ".join(section_order_sorted_str) diff --git a/conda_smithy/schema.py b/conda_smithy/schema.py index 8de71e9e3..edaaf336a 100644 --- a/conda_smithy/schema.py +++ b/conda_smithy/schema.py @@ -11,7 +11,7 @@ from pydantic import BaseModel, ConfigDict, Field, create_model try: - from enum import StrEnum + from enum import StrEnum # type: ignore except ImportError: from backports.strenum import StrEnum # type: ignore