Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python3-module-altrepo
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Unitsaev
python3-module-altrepo
Commits
a0d030c0
Verified
Commit
a0d030c0
authored
Apr 03, 2026
by
Kirill Unitsaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskoteka: add StrEnum types for method parameters
parent
09422da1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
9 deletions
+53
-9
methods.py
altrepo/taskoteka/methods.py
+10
-9
types.py
altrepo/taskoteka/types.py
+43
-0
No files found.
altrepo/taskoteka/methods.py
View file @
a0d030c0
...
@@ -4,6 +4,7 @@ from typing import Literal, overload
...
@@ -4,6 +4,7 @@ from typing import Literal, overload
from
..api.methods
import
BaseAPI
from
..api.methods
import
BaseAPI
from
.
import
models
from
.
import
models
from
.
import
types
from
.events
import
EventStream
from
.events
import
EventStream
...
@@ -32,10 +33,10 @@ class ALTRepoTaskoteka:
...
@@ -32,10 +33,10 @@ class ALTRepoTaskoteka:
@overload
@overload
async
def
tasks
(
async
def
tasks
(
self
,
*
,
self
,
*
,
state
:
str
|
None
=
...
,
state
:
types
.
TaskState
|
str
|
None
=
...
,
repo
:
str
|
None
=
...
,
repo
:
types
.
Repo
|
str
|
None
=
...
,
user
:
str
|
None
=
...
,
user
:
str
|
None
=
...
,
needs_approval
:
Literal
[
"maint"
,
"tester"
]
|
None
=
...
,
needs_approval
:
types
.
ApprovalGroup
|
None
=
...
,
q
:
str
|
None
=
...
,
q
:
str
|
None
=
...
,
brief
:
Literal
[
True
],
brief
:
Literal
[
True
],
)
->
list
[
int
]:
...
)
->
list
[
int
]:
...
...
@@ -43,10 +44,10 @@ class ALTRepoTaskoteka:
...
@@ -43,10 +44,10 @@ class ALTRepoTaskoteka:
@overload
@overload
async
def
tasks
(
async
def
tasks
(
self
,
*
,
self
,
*
,
state
:
str
|
None
=
...
,
state
:
types
.
TaskState
|
str
|
None
=
...
,
repo
:
str
|
None
=
...
,
repo
:
types
.
Repo
|
str
|
None
=
...
,
user
:
str
|
None
=
...
,
user
:
str
|
None
=
...
,
needs_approval
:
Literal
[
"maint"
,
"tester"
]
|
None
=
...
,
needs_approval
:
types
.
ApprovalGroup
|
None
=
...
,
q
:
str
|
None
=
...
,
q
:
str
|
None
=
...
,
brief
:
Literal
[
False
]
=
...
,
brief
:
Literal
[
False
]
=
...
,
)
->
list
[
models
.
TaskSummaryModel
]:
...
)
->
list
[
models
.
TaskSummaryModel
]:
...
...
@@ -54,10 +55,10 @@ class ALTRepoTaskoteka:
...
@@ -54,10 +55,10 @@ class ALTRepoTaskoteka:
async
def
tasks
(
async
def
tasks
(
self
,
self
,
task_id
:
int
|
None
=
None
,
task_id
:
int
|
None
=
None
,
state
:
str
|
None
=
None
,
state
:
types
.
TaskState
|
str
|
None
=
None
,
repo
:
str
|
None
=
None
,
repo
:
types
.
Repo
|
str
|
None
=
None
,
user
:
str
|
None
=
None
,
user
:
str
|
None
=
None
,
needs_approval
:
Literal
[
"maint"
,
"tester"
]
|
None
=
None
,
needs_approval
:
types
.
ApprovalGroup
|
None
=
None
,
q
:
str
|
None
=
None
,
q
:
str
|
None
=
None
,
brief
:
bool
=
False
,
brief
:
bool
=
False
,
)
->
list
[
models
.
TaskSummaryModel
]
|
list
[
int
]
|
models
.
TaskModel
|
int
:
)
->
list
[
models
.
TaskSummaryModel
]
|
list
[
int
]
|
models
.
TaskModel
|
int
:
...
...
altrepo/taskoteka/types.py
0 → 100644
View file @
a0d030c0
from
enum
import
StrEnum
class
TaskState
(
StrEnum
):
NEW
=
"NEW"
AWAITING
=
"AWAITING"
PENDING
=
"PENDING"
BUILDING
=
"BUILDING"
COMMITTING
=
"COMMITTING"
TESTED
=
"TESTED"
FAILING
=
"FAILING"
FAILED
=
"FAILED"
DONE
=
"DONE"
SWEPT
=
"SWEPT"
EPERM
=
"EPERM"
POSTPONED
=
"POSTPONED"
class
Repo
(
StrEnum
):
sisyphus
=
"sisyphus"
p11
=
"p11"
p10
=
"p10"
p9
=
"p9"
p8
=
"p8"
p7
=
"p7"
p6
=
"p6"
c10f2
=
"c10f2"
c10f1
=
"c10f1"
c9f2
=
"c9f2"
c9f1
=
"c9f1"
c9m2
=
"c9m2"
c9m1
=
"c9m1"
c8_1
=
"c8.1"
c8
=
"c8"
c7_1
=
"c7.1"
c7
=
"c7"
t7
=
"t7"
icarus
=
"icarus"
class
ApprovalGroup
(
StrEnum
):
maint
=
"maint"
tester
=
"tester"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment