From edcb5d845e1c7f7846f10c80ccca77d57c49c31e Mon Sep 17 00:00:00 2001 From: Nathan Nowack Date: Fri, 15 Dec 2023 10:38:33 -0600 Subject: [PATCH] lint --- src/marvin/components/ai_classifier.py | 10 +++++++--- src/marvin/components/ai_image.py | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/marvin/components/ai_classifier.py b/src/marvin/components/ai_classifier.py index 493aadea9..79beb9319 100644 --- a/src/marvin/components/ai_classifier.py +++ b/src/marvin/components/ai_classifier.py @@ -52,7 +52,9 @@ class AIClassifier( model_config = ConfigDict(arbitrary_types_allowed=True) fn: Optional[Callable[P, Union[T, Coroutine[Any, Any, T]]]] = None environment: Optional[BaseEnvironment] = None - prompt: Optional[str] = Field(default=inspect.cleandoc(""" + prompt: Optional[str] = Field( + default=inspect.cleandoc( + """ ## Expert Classifier **Objective**: You are an expert classifier that always chooses correctly. @@ -71,7 +73,9 @@ class AIClassifier( - {{ arg }}: {{ value }} {% endfor %} \n\nASSISTANT: The most likely class label for the data and context provided above is Class" - """)) # noqa + """ + ) + ) # noqa encoder: Callable[[str], list[int]] = Field(default=None) max_tokens: int = 1 temperature: float = 0.0 @@ -198,7 +202,7 @@ def ai_classifier( ) def decorator( - func: Callable[P, Union[T, Coroutine[Any, Any, T]]] + func: Callable[P, Union[T, Coroutine[Any, Any, T]]], ) -> Callable[P, Union[T, Coroutine[Any, Any, T]]]: return AIClassifier[P, T].as_decorator( fn=func, diff --git a/src/marvin/components/ai_image.py b/src/marvin/components/ai_image.py index 905acb086..82923e3f5 100644 --- a/src/marvin/components/ai_image.py +++ b/src/marvin/components/ai_image.py @@ -142,7 +142,7 @@ def wrapper( return wraps(fn)(partial(wrapper, fn)) def decorator( - fn: Callable[P, Any] + fn: Callable[P, Any], ) -> Callable[P, Union["ImagesResponse", Coroutine[Any, Any, "ImagesResponse"]]]: return wraps(fn)(partial(wrapper, fn))