Skip to content

Commit

Permalink
More documentation fixes for ReadTheDocs
Browse files Browse the repository at this point in the history
  • Loading branch information
ambv committed Mar 25, 2018
1 parent b481f87 commit 5ad7383
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion docs/black.py

This file was deleted.

10 changes: 5 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import ast
from pathlib import Path
import re

Expand All @@ -23,11 +22,11 @@


def get_version():
black_py = CURRENT_DIR / 'black.py'
_version_re = re.compile(r'__version__\s+=\s+(?P<version>.*)')
with open(black_py, 'r', encoding='utf8') as f:
changelog = CURRENT_DIR / 'changelog.md'
_version_re = re.compile(r'## (?P<version>\d\d\.\d{1,2}.*)')
with open(changelog, 'r', encoding='utf8') as f:
version = _version_re.search(f.read()).group('version')
return str(ast.literal_eval(version))
return version


# -- Project information -----------------------------------------------------
Expand All @@ -43,6 +42,7 @@ def get_version():
version = release
for sp in 'abcfr':
version = version.split(sp)[0]
print('black\nRelease: {}\nVersion: {}'.format(release, version))

# -- General configuration ---------------------------------------------------

Expand Down

0 comments on commit 5ad7383

Please sign in to comment.