Skip to content

Commit

Permalink
Merge pull request Yelp#408 from cbows/fix-broken-pre-commit-hook
Browse files Browse the repository at this point in the history
avoid importing detect_secrets in setup.py
  • Loading branch information
domanchi authored Feb 25, 2021
2 parents 6ccb85a + 0058e45 commit e985f2d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
from pathlib import Path
from setuptools import find_packages
from setuptools import setup

from detect_secrets.__version__ import VERSION

def get_version():
"""Parse package __version__.py to get version."""
versionpy = Path('detect_secrets/__version__.py').read_text()
return versionpy.split("'")[1]


VERSION = get_version()


with open('README.md') as f:
Expand Down

0 comments on commit e985f2d

Please sign in to comment.