Skip to content

Commit

Permalink
Fixes coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Oct 1, 2018
1 parent b52936c commit 180a172
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions wemake_python_styleguide/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

import pkg_resources

pkg_name = 'wemake-python-styleguide'


def _get_version(dist_name: str) -> str:
def _get_version(dist_name: str) -> str: # pragma: no cover
"""Fetches distribution name. Contains a fix for Sphinx."""
try:
return pkg_resources.get_distribution(dist_name).version
except pkg_resources.DistributionNotFound:
return '0.0.0'
return '' # readthedocs can not install `poetry` projects


pkg_name = 'wemake-python-styleguide'

#: We store the version number inside the `pyproject.toml`:
pkg_version: str = _get_version(pkg_name)

0 comments on commit 180a172

Please sign in to comment.