From fc8585eabd98b59ed2eb67ffd49ff1243875c9bd Mon Sep 17 00:00:00 2001 From: Patrick Devine Date: Mon, 13 Jan 2025 16:42:31 -0800 Subject: [PATCH] feed ruff --- ollama/_client.py | 2 -- tests/test_client.py | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ollama/_client.py b/ollama/_client.py index fff16fc..0bd8598 100644 --- a/ollama/_client.py +++ b/ollama/_client.py @@ -1,5 +1,4 @@ import os -import io import json import platform import ipaddress @@ -62,7 +61,6 @@ from ollama._types import ( ProgressResponse, PullRequest, PushRequest, - RequestError, ResponseError, ShowRequest, ShowResponse, diff --git a/tests/test_client.py b/tests/test_client.py index 2a83eb0..eb18a19 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -946,7 +946,7 @@ async def test_async_client_create_with_blob(httpserver: HTTPServer): client = AsyncClient(httpserver.url_for('/')) - with tempfile.NamedTemporaryFile() as blob: + with tempfile.NamedTemporaryFile(): response = await client.create('dummy', files={'test.gguf': 'sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'}) assert response['status'] == 'success' @@ -972,7 +972,7 @@ async def test_async_client_create_with_parameters_roundtrip(httpserver: HTTPSer client = AsyncClient(httpserver.url_for('/')) - with tempfile.NamedTemporaryFile() as blob: + with tempfile.NamedTemporaryFile(): response = await client.create( 'dummy', quantize='q4_k_m',