mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 20:14:13 +00:00
try change type to TypeAlias
This commit is contained in:
parent
cd51dcd4f7
commit
e0a8f04766
2 changed files with 4 additions and 3 deletions
|
@ -11,7 +11,7 @@ import threading
|
||||||
from collections.abc import Callable, Coroutine, Iterable
|
from collections.abc import Callable, Coroutine, Iterable
|
||||||
from datetime import UTC, datetime
|
from datetime import UTC, datetime
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from typing import Any
|
from typing import Any, TypeAlias
|
||||||
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
|
@ -30,8 +30,8 @@ class JobStatus(Enum):
|
||||||
completed = "completed"
|
completed = "completed"
|
||||||
|
|
||||||
|
|
||||||
type JobID = str
|
JobID: TypeAlias = str
|
||||||
type JobType = str
|
JobType: TypeAlias = str
|
||||||
|
|
||||||
|
|
||||||
class JobArtifact(BaseModel):
|
class JobArtifact(BaseModel):
|
||||||
|
|
|
@ -214,6 +214,7 @@ ignore = [
|
||||||
|
|
||||||
# These are the additional ones we started ignoring after moving to ruff. We should look into each one of them later.
|
# These are the additional ones we started ignoring after moving to ruff. We should look into each one of them later.
|
||||||
"C901", # Complexity of the function is too high
|
"C901", # Complexity of the function is too high
|
||||||
|
"UP040", # TypeAlias vs type keyword - disabled due to Pydantic compatibility
|
||||||
]
|
]
|
||||||
unfixable = [
|
unfixable = [
|
||||||
"PLE2515",
|
"PLE2515",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue