Ver código fonte

fix mypy error at `__version__ = None`

Fabian Peter Hammerle 3 anos atrás
pai
commit
0a4041e1d7
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      setup.py

+ 1 - 1
setup.py

@@ -10,7 +10,7 @@ setuptools.setup(
     use_scm_version={
         "write_to": os.path.join("freesurfer_surface", "version.py"),
         # `version` triggers pylint C0103
-        "write_to_template": "__version__ = '{version}'\n",
+        "write_to_template": "import typing; __version__: typing.Optional[str] = '{version}'\n",
     },
     description="Python Library to Read and Write Surface Files"
     " in Freesurfer's TriangularSurface Format",