Skip to content

Commit

Permalink
even more legacy types
Browse files Browse the repository at this point in the history
  • Loading branch information
ytausch committed Apr 5, 2024
1 parent 7852a01 commit 3331fcb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions conda_smithy/lint_recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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. "
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions conda_smithy/linting_types.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down

0 comments on commit 3331fcb

Please sign in to comment.