From fd789a6d95e69c38bef1aa8625f7fbd16660a201 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 11 Jun 2024 19:11:02 +0200 Subject: Merging upstream version 0.1.36. Signed-off-by: Daniel Baumann --- tests/lint_tests/conftest.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'tests/lint_tests/conftest.py') diff --git a/tests/lint_tests/conftest.py b/tests/lint_tests/conftest.py index bf4b3b0..e364bbc 100644 --- a/tests/lint_tests/conftest.py +++ b/tests/lint_tests/conftest.py @@ -3,22 +3,25 @@ from debian.debian_support import DpkgArchTable from debputy._deb_options_profiles import DebBuildOptionsAndProfiles from debputy.architecture_support import DpkgArchitectureBuildProcessValuesTable -from debputy.lsp.style_prefs import StylePreferenceTable from debputy.packages import DctrlParser from debputy.util import setup_logging try: - from lsprotocol.types import Diagnostic from debputy.lsp.spellchecking import disable_spellchecking - - HAS_LSPROTOCOL = True except ImportError: - HAS_LSPROTOCOL = False def disable_spellchecking() -> None: pass +try: + from lsprotocol import types +except ImportError: + HAS_LSPROTOCOL = False +else: + HAS_LSPROTOCOL = True + + @pytest.fixture(scope="session", autouse=True) def enable_logging() -> None: if not HAS_LSPROTOCOL: -- cgit v1.2.3