summaryrefslogtreecommitdiffstats
path: root/tests/lint_tests/conftest.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lint_tests/conftest.py')
-rw-r--r--tests/lint_tests/conftest.py13
1 files changed, 8 insertions, 5 deletions
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: