global __version__ In setup.py (#4753)
This change helps both humans and linters to understand the unusual method of instantiating this global variable.
This commit is contained in:
parent
fc243c15fb
commit
35567c1668
@ -44,6 +44,7 @@ def GetVersion():
|
|||||||
|
|
||||||
with open(os.path.join('google', 'protobuf', '__init__.py')) as version_file:
|
with open(os.path.join('google', 'protobuf', '__init__.py')) as version_file:
|
||||||
exec(version_file.read(), globals())
|
exec(version_file.read(), globals())
|
||||||
|
global __version__
|
||||||
return __version__
|
return __version__
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user