Skip to content
Snippets Groups Projects
Verified Commit 3098ca66 authored by Jakob Moser's avatar Jakob Moser
Browse files

Add some more descriptive type aliases

parent de55edc5
No related branches found
No related tags found
1 merge request!22Make MyPy happy
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment