chore: remove nested imports

* Since our API packages use import * in __init__.py, we can import
  directly from llama_stack.apis.models instead of
  llama_stack.apis.models.models.  However, the choice to use import *
  is debatable and may need to be reconsidered in the future.

* Remove the unnecessary Ruff F401 suppression.

* Consolidate the Ruff F403 rule configuration in
pyproject.toml.

Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
Sébastien Han 2025-06-25 13:07:15 +02:00
parent cfee63bd0d
commit c245cb580c
No known key found for this signature in database
82 changed files with 143 additions and 164 deletions

View file

@ -6,7 +6,7 @@
from pathlib import Path
from llama_stack.apis.models.models import ModelType
from llama_stack.apis.models import ModelType
from llama_stack.distribution.datatypes import ModelInput, Provider, ToolGroupInput
from llama_stack.providers.inline.inference.sentence_transformers import (
SentenceTransformersInferenceConfig,

View file

@ -5,7 +5,7 @@
# the root directory of this source tree.
from llama_stack.apis.models.models import ModelType
from llama_stack.apis.models import ModelType
from llama_stack.distribution.datatypes import (
ModelInput,
Provider,

View file

@ -4,7 +4,7 @@
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
from llama_stack.apis.models.models import ModelType
from llama_stack.apis.models import ModelType
from llama_stack.distribution.datatypes import (
ModelInput,
Provider,

View file

@ -6,7 +6,7 @@
from pathlib import Path
from llama_stack.apis.models.models import ModelType
from llama_stack.apis.models import ModelType
from llama_stack.distribution.datatypes import (
ModelInput,
Provider,

View file

@ -6,7 +6,7 @@
from pathlib import Path
from llama_stack.apis.models.models import ModelType
from llama_stack.apis.models import ModelType
from llama_stack.distribution.datatypes import ModelInput, Provider, ToolGroupInput
from llama_stack.providers.inline.inference.sentence_transformers import (
SentenceTransformersInferenceConfig,

View file

@ -4,7 +4,7 @@
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
from llama_stack.apis.models.models import ModelType
from llama_stack.apis.models import ModelType
from llama_stack.distribution.datatypes import (
ModelInput,
Provider,

View file

@ -4,7 +4,7 @@
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
from llama_stack.apis.models.models import ModelType
from llama_stack.apis.models import ModelType
from llama_stack.distribution.datatypes import (
ModelInput,
Provider,

View file

@ -5,7 +5,7 @@
# the root directory of this source tree.
from llama_stack.apis.models.models import ModelType
from llama_stack.apis.models import ModelType
from llama_stack.distribution.datatypes import (
ModelInput,
Provider,

View file

@ -6,7 +6,7 @@
from pathlib import Path
from llama_stack.apis.models.models import ModelType
from llama_stack.apis.models import ModelType
from llama_stack.distribution.datatypes import (
ModelInput,
Provider,

View file

@ -6,7 +6,7 @@
from pathlib import Path
from llama_stack.apis.models.models import ModelType
from llama_stack.apis.models import ModelType
from llama_stack.distribution.datatypes import (
ModelInput,
Provider,

View file

@ -6,7 +6,7 @@
from llama_stack.apis.datasets import DatasetPurpose, URIDataSource
from llama_stack.apis.models.models import ModelType
from llama_stack.apis.models import ModelType
from llama_stack.distribution.datatypes import (
BenchmarkInput,
DatasetInput,

View file

@ -6,7 +6,7 @@
from pathlib import Path
from llama_stack.apis.models.models import ModelType
from llama_stack.apis.models import ModelType
from llama_stack.distribution.datatypes import (
ModelInput,
Provider,

View file

@ -5,7 +5,7 @@
# the root directory of this source tree.
from llama_stack.apis.models.models import ModelType
from llama_stack.apis.models import ModelType
from llama_stack.distribution.datatypes import (
ModelInput,
Provider,

View file

@ -6,7 +6,7 @@
from pathlib import Path
from llama_stack.apis.models.models import ModelType
from llama_stack.apis.models import ModelType
from llama_stack.distribution.datatypes import (
ModelInput,
Provider,

View file

@ -6,7 +6,7 @@
from pathlib import Path
from llama_stack.apis.models.models import ModelType
from llama_stack.apis.models import ModelType
from llama_stack.distribution.datatypes import (
ModelInput,
Provider,

View file

@ -5,7 +5,7 @@
# the root directory of this source tree.
from llama_stack.apis.models.models import ModelType
from llama_stack.apis.models import ModelType
from llama_stack.distribution.datatypes import (
ModelInput,
Provider,

View file

@ -13,7 +13,7 @@ import yaml
from pydantic import BaseModel, Field
from llama_stack.apis.datasets import DatasetPurpose
from llama_stack.apis.models.models import ModelType
from llama_stack.apis.models import ModelType
from llama_stack.distribution.datatypes import (
Api,
BenchmarkInput,

View file

@ -6,7 +6,7 @@
from pathlib import Path
from llama_stack.apis.models.models import ModelType
from llama_stack.apis.models import ModelType
from llama_stack.distribution.datatypes import (
ModelInput,
Provider,

View file

@ -6,7 +6,7 @@
from pathlib import Path
from llama_stack.apis.models.models import ModelType
from llama_stack.apis.models import ModelType
from llama_stack.distribution.datatypes import (
ModelInput,
Provider,

View file

@ -4,7 +4,7 @@
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
from llama_stack.apis.models.models import ModelType
from llama_stack.apis.models import ModelType
from llama_stack.distribution.datatypes import ModelInput, Provider
from llama_stack.providers.inline.inference.sentence_transformers import (
SentenceTransformersInferenceConfig,

View file

@ -6,7 +6,7 @@
from pathlib import Path
from llama_stack.apis.models.models import ModelType
from llama_stack.apis.models import ModelType
from llama_stack.distribution.datatypes import ModelInput, Provider, ToolGroupInput
from llama_stack.providers.inline.inference.sentence_transformers import (
SentenceTransformersInferenceConfig,