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_validations.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tests/test_validations.py') diff --git a/tests/test_validations.py b/tests/test_validations.py index a8fbf1b..5263cdc 100644 --- a/tests/test_validations.py +++ b/tests/test_validations.py @@ -17,13 +17,16 @@ from __future__ import annotations -from pathlib import Path -from re import Match +from typing import TYPE_CHECKING import pytest from wikiget.validations import valid_file, valid_site, verify_hash +if TYPE_CHECKING: + from pathlib import Path + from re import Match + class TestSiteInput: @pytest.fixture( -- cgit v1.2.3