File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ from typing import Any , Dict , Optional , cast
12from .base import Base
2-
3+ from . types import TicketsResponse
34
45class Ticketing (Base ):
5- def tickets (self , params : dict = None ):
6+ def tickets (self , params : Optional [ Dict [ str , Any ]] = None ) -> TicketsResponse :
67 """
78 List ticketing tickets
89 """
@@ -12,4 +13,4 @@ def tickets(self, params: dict = None):
1213 if not response .ok :
1314 raise Exception (f"Failed to fetch ticketing/tickets: { response .status_code } " )
1415
15- return response .json ()
16+ return cast ( TicketsResponse , response .json () )
Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ class BranchesResponse(TypedDict):
160160
161161# Project Management
162162
163- class PmIssue (TypedDict ):
163+ class TicketingTicket (TypedDict ):
164164 id : str
165165 title : str
166166 status : str
@@ -170,6 +170,6 @@ class PmIssue(TypedDict):
170170 updated_at : str
171171
172172
173- class IssuesResponse (TypedDict ):
174- data : List [PmIssue ]
173+ class TicketsResponse (TypedDict ):
174+ data : List [TicketingTicket ]
175175 metadata : Metadata
You can’t perform that action at this time.
0 commit comments