Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit06184da

Browse files
chore: add type-hints to setup.py and check with mypy
1 parentf775668 commit06184da

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

‎.pre-commit-config.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ repos:
2727
additional_dependencies:
2828
-types-PyYAML==6.0.1
2929
-types-requests==2.26.0
30+
-types-setuptools==57.4.2

‎requirements-lint.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ isort==5.10.1
44
mypy==0.910
55
types-PyYAML==6.0.1
66
types-requests==2.26.0
7+
types-setuptools==57.4.2

‎setup.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44
fromsetuptoolsimportfind_packages,setup
55

66

7-
defget_version():
7+
defget_version()->str:
8+
version=""
89
withopen("gitlab/__version__.py")asf:
910
forlineinf:
1011
ifline.startswith("__version__"):
11-
returneval(line.split("=")[-1])
12+
version=eval(line.split("=")[-1])
13+
break
14+
returnversion
1215

1316

1417
withopen("README.rst","r")asreadme_file:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp