From 51798a18eaa5c7b7d45ecf4a9f286db9e95fef48 Mon Sep 17 00:00:00 2001 From: Cody Logan Date: Wed, 8 Nov 2023 09:22:17 -0800 Subject: Conditionally import modules used for type checking --- tests/test_parse.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tests/test_parse.py') diff --git a/tests/test_parse.py b/tests/test_parse.py index e3bef2d..7ef182c 100644 --- a/tests/test_parse.py +++ b/tests/test_parse.py @@ -19,15 +19,19 @@ from __future__ import annotations import io import logging -from pathlib import Path +from typing import TYPE_CHECKING import pytest from wikiget.exceptions import ParseError -from wikiget.file import File from wikiget.parse import get_dest, read_batch_file from wikiget.wikiget import parse_args +if TYPE_CHECKING: + from pathlib import Path + + from wikiget.file import File + class TestGetDest: @pytest.fixture() -- cgit v1.2.3