소스 검색

fix mypy error at `__version__ = None`

Fabian Peter Hammerle 3 년 전
부모
커밋
0a4041e1d7
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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",