-
Notifications
You must be signed in to change notification settings - Fork 732
Expand file tree
/
Copy pathmaintainer_info.py
More file actions
36 lines (23 loc) · 856 Bytes
/
maintainer_info.py
File metadata and controls
36 lines (23 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from typing import Literal
from pydantic import BaseModel
class MaintainerFile(BaseModel):
file_name: str | None = None
error: str | None = None
class MaintainerInfoItem(BaseModel):
github_username: str | None = None
name: str | None = None
title: str | None = None
normalized_title: Literal["maintainer", "contributor"] | None = None
email: str | None = None
class MaintainerInfo(BaseModel):
info: list[MaintainerInfoItem] | None = None
error: str | None = None
class AggregatedMaintainerInfoItems(BaseModel):
info: list[MaintainerInfoItem]
class AggregatedMaintainerInfo(BaseModel):
output: AggregatedMaintainerInfoItems
cost: float
class MaintainerResult(BaseModel):
maintainer_file: str | None = None
maintainer_info: list[MaintainerInfoItem] | None = None
total_cost: float = 0