Skip to content

Commit dcba94a

Browse files
committed
Redefine version handling
1 parent a6b0de0 commit dcba94a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sphinxcontrib/email/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import importlib_metadata as metadata
1515

1616
try:
17-
__version__ = ".".join(metadata.version("sphinxcontrib-email").split(".")[:3])
17+
__version__ = metadata.version("sphinxcontrib-email")
1818
except metadata.PackageNotFoundError:
1919
pass
2020

@@ -25,4 +25,4 @@ def setup(app: Sphinx) -> dict[str, Any]:
2525
app.add_config_value(name="email_automode", default=False, rebuild="env")
2626
app.connect("html-page-context", html_page_context_handler)
2727
app.add_role("email", EmailRole())
28-
return {"version": __version__}
28+
return {"version": ".".join(__version__.split(".")[:3])}

0 commit comments

Comments
 (0)