From 2ac7a3556310374ea5d1816a890b9f23b4bb837d Mon Sep 17 00:00:00 2001 From: Angus Jelinek Date: Fri, 20 Dec 2024 11:50:12 -0500 Subject: [PATCH] mypy ignore optional imports --- python/langsmith/_internal/_compressed_runs.py | 2 +- python/langsmith/_internal/_operations.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/langsmith/_internal/_compressed_runs.py b/python/langsmith/_internal/_compressed_runs.py index 7871ebffc..2b838f3f1 100644 --- a/python/langsmith/_internal/_compressed_runs.py +++ b/python/langsmith/_internal/_compressed_runs.py @@ -2,7 +2,7 @@ import threading try: - from zstandard import ZstdCompressor + from zstandard import ZstdCompressor # type: ignore[import] HAVE_ZSTD = True except ImportError: diff --git a/python/langsmith/_internal/_operations.py b/python/langsmith/_internal/_operations.py index 23e2d2c1d..5393c3222 100644 --- a/python/langsmith/_internal/_operations.py +++ b/python/langsmith/_internal/_operations.py @@ -6,7 +6,7 @@ from typing import Literal, Optional, Union, cast try: - from zstandard import ZstdCompressionWriter + from zstandard import ZstdCompressionWriter # type: ignore[import] except ImportError: class ZstdCompressionWriter: # type: ignore[no-redef]