Răsfoiți Sursa

global __version__ In setup.py (#4753)

This change helps both humans and linters to understand the unusual method of instantiating this global variable.
cclauss 7 ani în urmă
părinte
comite
35567c1668
1 a modificat fișierele cu 1 adăugiri și 0 ștergeri
  1. 1 0
      python/setup.py

+ 1 - 0
python/setup.py

@@ -44,6 +44,7 @@ def GetVersion():
 
   with open(os.path.join('google', 'protobuf', '__init__.py')) as version_file:
     exec(version_file.read(), globals())
+    global __version__
     return __version__