Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
masci committed Oct 2, 2024
1 parent b25eca8 commit 9b077d2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/banks/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ def _add_extensions(_env):
For example, we use banks to manage the system prompt in `GenerateExtension`
"""
from .extensions.chat import ChatMessage # pylint: disable=import-outside-toplevel
from .extensions.generate import GenerateExtension # pylint: disable=import-outside-toplevel
from .extensions.inference_endpoint import HFInferenceEndpointsExtension # pylint: disable=import-outside-toplevel
from .extensions.chat import ChatMessage

_env.add_extension(GenerateExtension)
_env.add_extension(HFInferenceEndpointsExtension)
Expand Down
2 changes: 1 addition & 1 deletion src/banks/extensions/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def parse(self, parser):
# Anything else is a parse error
error_msg = f"Invalid syntax for chat attribute, got '{gathered}', expected role=\"value\""
try:
attr_name, attr_assign, attr_value = gathered
attr_name, attr_assign, attr_value = gathered # pylint: disable=unbalanced-tuple-unpacking
except ValueError:
raise TemplateSyntaxError(error_msg, lineno) from None

Expand Down
2 changes: 1 addition & 1 deletion tests/test_prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import regex as re
from jinja2 import Environment

from banks import AsyncPrompt, Prompt, ChatMessage
from banks import AsyncPrompt, ChatMessage, Prompt
from banks.cache import DefaultCache
from banks.errors import AsyncError

Expand Down

0 comments on commit 9b077d2

Please sign in to comment.