From d23b7ad507a7d11e81d5c59d3543f0ddc76d4239 Mon Sep 17 00:00:00 2001 From: nichmor Date: Mon, 29 Apr 2024 16:33:56 +0300 Subject: [PATCH] fix: use lru_cache instead of cache (#5) --- src/rattler_build_conda_compat/lint.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/rattler_build_conda_compat/lint.py b/src/rattler_build_conda_compat/lint.py index 5045043..2a88107 100644 --- a/src/rattler_build_conda_compat/lint.py +++ b/src/rattler_build_conda_compat/lint.py @@ -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 @@ -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()