<commit_before>import datetime
import os

import setuptools_scm

extensions = ['sphinx.ext.autodoc']

templates_path = ['_templates']

source_suffix = '.rst'
master_doc = 'index'

project = 'vdirsyncer'
copyright = ('2014-{}, <NAME> & contributors'
             .format(datetime.date.today().strftime('%Y')))

release = setuptools_scm.get_version(root='..', relative_to=__file__)
version = '.'.join(release.split('.')[:2])  # The short X.Y version.

rst_epilog = '.. |vdirsyncer_version| replace:: %s' % release

exclude_patterns = ['_build']

pygments_style = 'sphinx'

on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

try:
    import sphinx_rtd_theme
    html_theme = 'sphinx_rtd_theme'
    html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
except ImportError:<commit_msg>Follow advice from setuptools_scm how to use it.<commit_after>import datetime
import os

from pkg_resources import get_distribution

extensions = ['sphinx.ext.autodoc']

templates_path = ['_templates']

source_suffix = '.rst'
master_doc = 'index'

project = 'vdirsyncer'
copyright = ('2014-{}, <NAME> & contributors'
             .format(datetime.date.today().strftime('%Y')))

release = get_distribution('vdirsyncer').version
version = '.'.join(release.split('.')[:2])  # The short X.Y version.

rst_epilog = '.. |vdirsyncer_version| replace:: %s' % release

exclude_patterns = ['_build']

pygments_style = 'sphinx'

on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

try:
    import sphinx_rtd_theme
    html_theme = 'sphinx_rtd_theme'
    html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
except ImportError:
{'fraction_non_alphanumeric': 0.14860681114551083, 'fraction_numerical': 0.006191950464396285, 'mean_word_length': 5.075187969924812, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4458126', 'n_tokens_mistral': 605, 'n_tokens_neox': 587, 'n_words': 111}