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():
|
||||
black_py = CURRENT_DIR / ".." / "black.py"
|
||||
_version_re = re.compile(r"__version__\s+=\s+(?P<version>.*)")
|
||||
with open(str(black_py), "r", encoding="utf8") as f:
|
||||
version = _version_re.search(f.read()).group("version")
|
||||
return str(ast.literal_eval(version))
|
||||
import sys
|
||||
|
||||
sys.path.append(str(CURRENT_DIR.parent))
|
||||
from _version import get_versions
|
||||
|
||||
v = get_versions()
|
||||
return v.get("closest-tag", v["version"])
|
||||
|
||||
|
||||
def make_pypi_svg(version):
|
||||
|
Loading…
Reference in New Issue
Block a user