fix doc generation
This commit is contained in:
parent
025d2ca4ba
commit
c9689b80fb
12
docs/conf.py
12
docs/conf.py
@ -25,11 +25,13 @@
|
|||||||
|
|
||||||
|
|
||||||
def get_version():
|
def get_version():
|
||||||
black_py = CURRENT_DIR / ".." / "black.py"
|
import sys
|
||||||
_version_re = re.compile(r"__version__\s+=\s+(?P<version>.*)")
|
|
||||||
with open(str(black_py), "r", encoding="utf8") as f:
|
sys.path.append(str(CURRENT_DIR.parent))
|
||||||
version = _version_re.search(f.read()).group("version")
|
from _version import get_versions
|
||||||
return str(ast.literal_eval(version))
|
|
||||||
|
v = get_versions()
|
||||||
|
return v.get("closest-tag", v["version"])
|
||||||
|
|
||||||
|
|
||||||
def make_pypi_svg(version):
|
def make_pypi_svg(version):
|
||||||
|
Loading…
Reference in New Issue
Block a user