summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorNejc Habjan <hab.nejc@gmail.com>2021-11-15 22:54:16 +0100
committerGitHub <noreply@github.com>2021-11-15 22:54:16 +0100
commita553ee76affc6e1030ab0464a8bb998168239f4a (patch)
treed943062b06805898b523755a80bac936a868344c /setup.py
parentf7756680d4b1d23ea3216458fb5c6bd73f709d5e (diff)
parent06184daafd5010ba40bb39a0768540b7e98bd171 (diff)
downloadgitlab-a553ee76affc6e1030ab0464a8bb998168239f4a.tar.gz
Merge pull request #1683 from python-gitlab/jlvillal/mypy_setup
chore: add type-hints to setup.py and check with mypy
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 95d60c8..afc7555 100644
--- a/setup.py
+++ b/setup.py
@@ -4,11 +4,14 @@
from setuptools import find_packages, setup
-def get_version():
+def get_version() -> str:
+ version = ""
with open("gitlab/__version__.py") as f:
for line in f:
if line.startswith("__version__"):
- return eval(line.split("=")[-1])
+ version = eval(line.split("=")[-1])
+ break
+ return version
with open("README.rst", "r") as readme_file: