From e0a8f04766305a9c07e29bbd91babef34796c5d6 Mon Sep 17 00:00:00 2001 From: Swapna Lekkala Date: Mon, 8 Sep 2025 14:10:59 -0700 Subject: [PATCH] try change type to TypeAlias --- llama_stack/providers/utils/scheduler.py | 6 +++--- pyproject.toml | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/llama_stack/providers/utils/scheduler.py b/llama_stack/providers/utils/scheduler.py index 146591b2f..763d670ff 100644 --- a/llama_stack/providers/utils/scheduler.py +++ b/llama_stack/providers/utils/scheduler.py @@ -11,7 +11,7 @@ import threading from collections.abc import Callable, Coroutine, Iterable from datetime import UTC, datetime from enum import Enum -from typing import Any +from typing import Any, TypeAlias from pydantic import BaseModel @@ -30,8 +30,8 @@ class JobStatus(Enum): completed = "completed" -type JobID = str -type JobType = str +JobID: TypeAlias = str +JobType: TypeAlias = str class JobArtifact(BaseModel): diff --git a/pyproject.toml b/pyproject.toml index 133b78dbf..1fc05368f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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. "C901", # Complexity of the function is too high + "UP040", # TypeAlias vs type keyword - disabled due to Pydantic compatibility ] unfixable = [ "PLE2515",