From 1c6d8f03c964eb65ab62790d56b11da5f53555a5 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Fri, 13 Oct 2023 12:40:21 +0200 Subject: [PATCH] Use importlib.metadata to get the version. --- sphinxlint/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sphinxlint/__init__.py b/sphinxlint/__init__.py index 28d5740cf..2d3c7f1bf 100644 --- a/sphinxlint/__init__.py +++ b/sphinxlint/__init__.py @@ -1,7 +1,9 @@ """Sphinx linter.""" -__version__ = "0.6.8" +import importlib.metadata from sphinxlint.sphinxlint import check_file, check_text +__version__ = importlib.metadata.version(__name__) + __all__ = ["check_text", "check_file"]