Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Portal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Fachschaft
Portal
Commits
3098ca66
Verified
Commit
3098ca66
authored
7 months ago
by
Jakob Moser
Browse files
Options
Downloads
Patches
Plain Diff
Add some more descriptive type aliases
parent
de55edc5
No related branches found
Branches containing commit
No related tags found
1 merge request
!22
Make MyPy happy
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
portal/problem_details.py
+5
-2
5 additions, 2 deletions
portal/problem_details.py
with
5 additions
and
2 deletions
portal/problem_details.py
+
5
−
2
View file @
3098ca66
...
...
@@ -2,9 +2,12 @@
Provide RFC 7807-compliant problem details responses for the API.
"""
from
typing
import
Optional
from
typing
import
Any
,
Optional
ProblemResponse
=
tuple
[
dict
,
int
,
dict
]
ResponseBody
=
dict
[
str
,
Any
]
HttpStatusCode
=
int
HttpHeaders
=
dict
[
str
,
str
]
ProblemResponse
=
tuple
[
ResponseBody
,
HttpStatusCode
,
HttpHeaders
]
def
unauthorized
()
->
ProblemResponse
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment