From e1d799a7ae5b81c40ec30ceef064aa61f76516e0 Mon Sep 17 00:00:00 2001 From: Yannik Tausch Date: Tue, 2 Apr 2024 18:38:34 +0200 Subject: [PATCH] even more legacy types --- conda_smithy/lint_recipe.py | 6 +++--- conda_smithy/linting_types.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/conda_smithy/lint_recipe.py b/conda_smithy/lint_recipe.py index d1205e9f4..43fe1867c 100644 --- a/conda_smithy/lint_recipe.py +++ b/conda_smithy/lint_recipe.py @@ -9,7 +9,7 @@ import os import re from pathlib import Path -from typing import Optional, Dict, Iterable +from typing import Optional, Dict, Iterable, Tuple, List import requests import shutil @@ -223,7 +223,7 @@ def lint_forge_yaml(recipe_dir: Path) -> LintsHints: def lintify_forge_yaml( recipe_dir: Optional[str] = None, -) -> tuple[list[str], list[str]]: +) -> Tuple[List[str], List[str]]: warnings.warn( "lintify_forge_yaml is deprecated and will be removed in v4, use lint_forge_yaml instead. " "Make sure to pass a Path object and expect a LintsHints object as return value. " @@ -251,7 +251,7 @@ def lintify_forge_yaml( def lintify_meta_yaml( meta, recipe_dir=None, conda_forge=False -) -> tuple[list[str], list[str]]: +) -> Tuple[List[str], List[str]]: """ Lint the meta.yaml file, relative to the recipe_dir. :returns: a tuple (lints, hints) diff --git a/conda_smithy/linting_types.py b/conda_smithy/linting_types.py index 3fab5934f..bff78517b 100644 --- a/conda_smithy/linting_types.py +++ b/conda_smithy/linting_types.py @@ -1,13 +1,13 @@ from __future__ import annotations from dataclasses import dataclass, field -from typing import Any, Callable +from typing import Any, Callable, List @dataclass class LintsHints: - lints: list[str] = field(default_factory=list) - hints: list[str] = field(default_factory=list) + lints: List[str] = field(default_factory=list) + hints: List[str] = field(default_factory=list) def __add__(self, other: Any) -> LintsHints: if not isinstance(other, LintsHints):