From: Harmon Date: Wed, 16 Oct 2019 17:58:13 +0000 (-0500) Subject: Improve variables names in setup.py X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=40b1316a471b2d6c14310e808f8c6ca16e032b73;p=tweepy.git Improve variables names in setup.py --- diff --git a/setup.py b/setup.py index 226988a..b7179c3 100644 --- a/setup.py +++ b/setup.py @@ -4,15 +4,15 @@ import re from setuptools import find_packages, setup -VERSIONFILE = "tweepy/__init__.py" -VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]" -with open(VERSIONFILE, "rt") as ver_file: - mo = re.search(VSRE, ver_file.read(), re.M) +VERSION_FILE = "tweepy/__init__.py" +VERSION_REGEX = r"^__version__ = ['\"]([^'\"]*)['\"]" +with open(VERSION_FILE, "rt") as version_file: + match = re.search(VERSION_REGEX, version_file.read(), re.M) -if mo: - version = mo.group(1) +if match: + version = match.group(1) else: - raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,)) + raise RuntimeError("Unable to find version string in %s." % (VERSION_FILE,)) tests_require = [ "mock>=1.0.1",