Skip to content

Commit

Permalink
fix: use lru_cache instead of cache (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
nichmor committed Apr 29, 2024
1 parent b1894f1 commit d23b7ad
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/rattler_build_conda_compat/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from typing import Any, Mapping, Sequence
import requests
from conda.models.version import VersionOrder
from functools import cache
from functools import lru_cache
from jsonschema import Draft202012Validator
from jsonschema import ValidationError
from textwrap import indent
Expand All @@ -26,15 +26,17 @@


def _format_validation_msg(error: ValidationError):
import pdb

pdb.set_trace()
return cleandoc(
f"""
In recipe.yaml: `{error.instance}`.
{indent(error.message, " " * 12 + "> ")}
In recipe.yaml: \n{indent(error.message, " " * 12 + "> ")}
"""
)


@cache
@lru_cache
def get_recipe_schema() -> dict[Any, Any]:
return requests.get(SCHEMA_URL).json()

Expand Down

0 comments on commit d23b7ad

Please sign in to comment.