File: iteration.py

package info (click to toggle)
python-aioazuredevops 2.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 304 kB
  • sloc: python: 1,770; makefile: 5
file content (39 lines) | stat: -rw-r--r-- 682 bytes parent folder | download
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
37
38
39
"""Azure DevOps iteration model."""

from dataclasses import dataclass
from datetime import datetime
from enum import StrEnum
from uuid import UUID

from . import ListResult


class IterationTimeFrame(StrEnum):
    """Iteration timeframe."""

    CURRENT = "current"
    FUTURE = "future"
    PAST = "past"


@dataclass
class IterationAttributes:
    """Azure DevOps iteration attributes."""

    start_date: datetime
    finish_date: datetime
    time_frame: IterationTimeFrame


@dataclass
class Iteration:
    """Azure DevOps iteration."""

    id: UUID
    name: str
    path: str
    attributes: IterationAttributes
    url: str


type IterationsResult = ListResult[Iteration]