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

Commit671e711

Browse files
JohnVillalovosnejch
authored andcommitted
chore(deps): update mypy to 1.14 and resolve issues
mypy 1.14 has a change to Enum Membership Semantics:https://mypy.readthedocs.io/en/latest/changelog.htmlResolve the issues with Enum and typing, and update mypy to 1.14
1 parente3cb806 commit671e711

File tree

3 files changed

+54
-54
lines changed

3 files changed

+54
-54
lines changed

‎.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ repos:
3232
-requests-toolbelt==1.0.0
3333
files:'gitlab/'
3434
-repo:https://github.com/pre-commit/mirrors-mypy
35-
rev:v1.13.0
35+
rev:v1.14.0
3636
hooks:
3737
-id:mypy
3838
args:[]

‎gitlab/const.py

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -9,83 +9,83 @@ class GitlabEnum(str, Enum):
99

1010
# https://gitlab.com/gitlab-org/gitlab/-/blob/e97357824bedf007e75f8782259fe07435b64fbb/lib/gitlab/access.rb#L12-18
1111
classAccessLevel(IntEnum):
12-
NO_ACCESS:int=0
13-
MINIMAL_ACCESS:int=5
14-
GUEST:int=10
15-
PLANNER:int=15
16-
REPORTER:int=20
17-
DEVELOPER:int=30
18-
MAINTAINER:int=40
19-
OWNER:int=50
20-
ADMIN:int=60
12+
NO_ACCESS=0
13+
MINIMAL_ACCESS=5
14+
GUEST=10
15+
PLANNER=15
16+
REPORTER=20
17+
DEVELOPER=30
18+
MAINTAINER=40
19+
OWNER=50
20+
ADMIN=60
2121

2222

2323
# https://gitlab.com/gitlab-org/gitlab/-/blob/e97357824bedf007e75f8782259fe07435b64fbb/lib/gitlab/visibility_level.rb#L23-25
2424
classVisibility(GitlabEnum):
25-
PRIVATE:str="private"
26-
INTERNAL:str="internal"
27-
PUBLIC:str="public"
25+
PRIVATE="private"
26+
INTERNAL="internal"
27+
PUBLIC="public"
2828

2929

3030
classNotificationLevel(GitlabEnum):
31-
DISABLED:str="disabled"
32-
PARTICIPATING:str="participating"
33-
WATCH:str="watch"
34-
GLOBAL:str="global"
35-
MENTION:str="mention"
36-
CUSTOM:str="custom"
31+
DISABLED="disabled"
32+
PARTICIPATING="participating"
33+
WATCH="watch"
34+
GLOBAL="global"
35+
MENTION="mention"
36+
CUSTOM="custom"
3737

3838

3939
# https://gitlab.com/gitlab-org/gitlab/-/blob/e97357824bedf007e75f8782259fe07435b64fbb/app/views/search/_category.html.haml#L10-37
4040
classSearchScope(GitlabEnum):
4141
# all scopes (global, group and project)
42-
PROJECTS:str="projects"
43-
ISSUES:str="issues"
44-
MERGE_REQUESTS:str="merge_requests"
45-
MILESTONES:str="milestones"
46-
WIKI_BLOBS:str="wiki_blobs"
47-
COMMITS:str="commits"
48-
BLOBS:str="blobs"
49-
USERS:str="users"
42+
PROJECTS="projects"
43+
ISSUES="issues"
44+
MERGE_REQUESTS="merge_requests"
45+
MILESTONES="milestones"
46+
WIKI_BLOBS="wiki_blobs"
47+
COMMITS="commits"
48+
BLOBS="blobs"
49+
USERS="users"
5050

5151
# specific global scope
52-
GLOBAL_SNIPPET_TITLES:str="snippet_titles"
52+
GLOBAL_SNIPPET_TITLES="snippet_titles"
5353

5454
# specific project scope
55-
PROJECT_NOTES:str="notes"
55+
PROJECT_NOTES="notes"
5656

5757

5858
# https://docs.gitlab.com/ee/api/merge_requests.html#merge-status
5959
classDetailedMergeStatus(GitlabEnum):
6060
# possible values for the detailed_merge_status field of Merge Requests
61-
BLOCKED_STATUS:str="blocked_status"
62-
BROKEN_STATUS:str="broken_status"
63-
CHECKING:str="checking"
64-
UNCHECKED:str="unchecked"
65-
CI_MUST_PASS:str="ci_must_pass"
66-
CI_STILL_RUNNING:str="ci_still_running"
67-
DISCUSSIONS_NOT_RESOLVED:str="discussions_not_resolved"
68-
DRAFT_STATUS:str="draft_status"
69-
EXTERNAL_STATUS_CHECKS:str="external_status_checks"
70-
MERGEABLE:str="mergeable"
71-
NOT_APPROVED:str="not_approved"
72-
NOT_OPEN:str="not_open"
73-
POLICIES_DENIED:str="policies_denied"
61+
BLOCKED_STATUS="blocked_status"
62+
BROKEN_STATUS="broken_status"
63+
CHECKING="checking"
64+
UNCHECKED="unchecked"
65+
CI_MUST_PASS="ci_must_pass"
66+
CI_STILL_RUNNING="ci_still_running"
67+
DISCUSSIONS_NOT_RESOLVED="discussions_not_resolved"
68+
DRAFT_STATUS="draft_status"
69+
EXTERNAL_STATUS_CHECKS="external_status_checks"
70+
MERGEABLE="mergeable"
71+
NOT_APPROVED="not_approved"
72+
NOT_OPEN="not_open"
73+
POLICIES_DENIED="policies_denied"
7474

7575

7676
# https://docs.gitlab.com/ee/api/pipelines.html
7777
classPipelineStatus(GitlabEnum):
78-
CREATED:str="created"
79-
WAITING_FOR_RESOURCE:str="waiting_for_resource"
80-
PREPARING:str="preparing"
81-
PENDING:str="pending"
82-
RUNNING:str="running"
83-
SUCCESS:str="success"
84-
FAILED:str="failed"
85-
CANCELED:str="canceled"
86-
SKIPPED:str="skipped"
87-
MANUAL:str="manual"
88-
SCHEDULED:str="scheduled"
78+
CREATED="created"
79+
WAITING_FOR_RESOURCE="waiting_for_resource"
80+
PREPARING="preparing"
81+
PENDING="pending"
82+
RUNNING="running"
83+
SUCCESS="success"
84+
FAILED="failed"
85+
CANCELED="canceled"
86+
SKIPPED="skipped"
87+
MANUAL="manual"
88+
SCHEDULED="scheduled"
8989

9090

9191
DEFAULT_URL:str="https://gitlab.com"

‎requirements-lint.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ black==24.10.0
44
commitizen==4.1.0
55
flake8==7.1.1
66
isort==5.13.2
7-
mypy==1.13.0
7+
mypy==1.14.0
88
pylint==3.3.2
99
pytest==8.3.4
1010
responses==0.25.3

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp