|
6 | 6 | import sys
|
7 | 7 | import types
|
8 | 8 |
|
| 9 | +# TODO: temporarily disabling warnings to mute a pydantic warning from liteLLM |
| 10 | +import warnings |
| 11 | + |
| 12 | +warnings.filterwarnings("ignore", "Valid config keys have changed in V2") |
| 13 | + |
9 | 14 | # from itertools import batched
|
10 |
| -from pathlib import Path |
11 |
| -from typing import Any, Generator, Optional, Sequence, TypeVar |
| 15 | +from pathlib import Path # noqa: E402 |
| 16 | +from typing import Any, Generator, Optional, Sequence, TypeVar # noqa: E402 |
12 | 17 |
|
13 |
| -import httpx |
14 |
| -import litellm |
15 |
| -import yaml |
16 |
| -from jinja2 import ( |
| 18 | +import httpx # noqa: E402 |
| 19 | +import litellm # noqa: E402 |
| 20 | +import yaml # noqa: E402 |
| 21 | +from jinja2 import ( # noqa: E402 |
17 | 22 | Environment,
|
18 | 23 | StrictUndefined,
|
19 | 24 | Template,
|
20 | 25 | TemplateSyntaxError,
|
21 | 26 | UndefinedError,
|
22 | 27 | )
|
23 |
| -from jinja2.nodes import TemplateData |
24 |
| -from jinja2.runtime import Undefined |
25 |
| -from pydantic import BaseModel |
| 28 | +from jinja2.nodes import TemplateData # noqa: E402 |
| 29 | +from jinja2.runtime import Undefined # noqa: E402 |
| 30 | +from pydantic import BaseModel # noqa: E402 |
26 | 31 |
|
27 |
| -from .pdl_ast import ( |
| 32 | +from .pdl_ast import ( # noqa: E402 |
28 | 33 | AdvancedBlockType,
|
29 | 34 | ArrayBlock,
|
30 | 35 | BamModelBlock,
|
|
66 | 71 | TextBlock,
|
67 | 72 | empty_block_location,
|
68 | 73 | )
|
69 |
| -from .pdl_dumper import block_to_dict |
70 |
| -from .pdl_llms import BamModel, LitellmModel |
71 |
| -from .pdl_location_utils import append, get_loc_string |
72 |
| -from .pdl_parser import PDLParseError, parse_file, parse_str |
73 |
| -from .pdl_scheduler import ( |
| 74 | +from .pdl_dumper import block_to_dict # noqa: E402 |
| 75 | +from .pdl_llms import BamModel, LitellmModel # noqa: E402 |
| 76 | +from .pdl_location_utils import append, get_loc_string # noqa: E402 |
| 77 | +from .pdl_parser import PDLParseError, parse_file, parse_str # noqa: E402 |
| 78 | +from .pdl_scheduler import ( # noqa: E402 |
74 | 79 | CodeYieldResultMessage,
|
75 | 80 | GeneratorWrapper,
|
76 | 81 | ModelCallMessage,
|
|
80 | 85 | YieldResultMessage,
|
81 | 86 | schedule,
|
82 | 87 | )
|
83 |
| -from .pdl_schema_validator import type_check_args, type_check_spec |
84 |
| -from .pdl_utils import ( |
| 88 | +from .pdl_schema_validator import type_check_args, type_check_spec # noqa: E402 |
| 89 | +from .pdl_utils import ( # noqa: E402 |
85 | 90 | get_contribute_value,
|
86 | 91 | messages_concat,
|
87 | 92 | messages_to_str,
|
|
0 commit comments