MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / get_version

Function get_version

demo/app.py:13–18  ·  view source on GitHub ↗
(pkg)

Source from the content-addressed store, hash-verified

11 import importlib, subprocess, sys
12
13 def get_version(pkg):
14 try:
15 m = importlib.import_module(pkg)
16 return getattr(m, "__version__", "0")
17 except Exception:
18 return "0"
19
20 try:
21 from packaging.version import Version

Callers 1

_ensure_versionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected