fix pylint W0404: Reimport 're' (imported line 21) (reimported)

This commit is contained in:
Hans-Christoph Steiner 2023-02-02 15:30:35 +01:00
parent 98769d8405
commit 156b3f91cc

View file

@ -159,7 +159,6 @@ def main():
output = 'git commit ' + subprocess.check_output(['git', 'rev-parse', 'HEAD'], output = 'git commit ' + subprocess.check_output(['git', 'rev-parse', 'HEAD'],
universal_newlines=True) universal_newlines=True)
elif os.path.exists('setup.py'): elif os.path.exists('setup.py'):
import re
m = re.search(r'''.*[\s,\(]+version\s*=\s*["']([0-9a-z.]+)["'].*''', m = re.search(r'''.*[\s,\(]+version\s*=\s*["']([0-9a-z.]+)["'].*''',
open('setup.py').read(), flags=re.MULTILINE) open('setup.py').read(), flags=re.MULTILINE)
if m: if m: