Skip to content

Commit 9d03d16

Browse files
authored
fix bugs from previous lint changes (#641)
* fix lint * fix type check * fix lint
1 parent 51f0502 commit 9d03d16

File tree

7 files changed

+13
-25
lines changed

7 files changed

+13
-25
lines changed

libs/ragulate/ragstack_ragulate/cli_commands/compare.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING, Any
3+
from typing import Any
44

55
from ragstack_ragulate.analysis import Analysis
66

77
from .utils import remove_sqlite_extension
88

9-
if TYPE_CHECKING:
10-
from argparse import ArgumentParser, _SubParsersAction
119

12-
13-
def setup_compare(subparsers: _SubParsersAction[ArgumentParser]) -> None:
10+
def setup_compare(subparsers) -> None: # type: ignore[no-untyped-def]
1411
"""Setup the compare command."""
1512
compare_parser = subparsers.add_parser(
1613
"compare", help="Compare results from 2 (or more) recipes"

libs/ragulate/ragstack_ragulate/cli_commands/dashboard.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
from argparse import ArgumentParser, _SubParsersAction
21
from typing import Any
32

43
from ragstack_ragulate.dashboard import run_dashboard
54

65
from .utils import remove_sqlite_extension
76

87

9-
def setup_dashboard(subparsers: _SubParsersAction[ArgumentParser]) -> None:
8+
def setup_dashboard(subparsers) -> None: # type: ignore[no-untyped-def]
109
"""Setup the dashboard command."""
1110
dashboard_parser = subparsers.add_parser(
1211
"dashboard",

libs/ragulate/ragstack_ragulate/cli_commands/download.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
from argparse import ArgumentParser, _SubParsersAction
21
from typing import Any
32

43
from ragstack_ragulate.datasets import get_dataset
54

65

7-
def setup_download(subparsers: _SubParsersAction[ArgumentParser]) -> None:
6+
def setup_download(subparsers) -> None: # type: ignore[no-untyped-def]
87
"""Setup the download command."""
98
download_parser = subparsers.add_parser("download", help="Download a dataset")
109
download_parser.add_argument(

libs/ragulate/ragstack_ragulate/cli_commands/ingest.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING, Any
3+
from typing import Any
44

55
from ragstack_ragulate.datasets import find_dataset
66
from ragstack_ragulate.pipelines import IngestPipeline
77
from ragstack_ragulate.utils import convert_vars_to_ingredients
88

9-
if TYPE_CHECKING:
10-
from argparse import ArgumentParser, _SubParsersAction
119

12-
13-
def setup_ingest(subparsers: _SubParsersAction[ArgumentParser]) -> None:
10+
def setup_ingest(subparsers) -> None: # type: ignore[no-untyped-def]
1411
"""Setup the ingest command."""
1512
ingest_parser = subparsers.add_parser("ingest", help="Run an ingest pipeline")
1613
ingest_parser.add_argument(

libs/ragulate/ragstack_ragulate/cli_commands/query.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING, Any
3+
from typing import Any
44

55
from ragstack_ragulate.datasets import find_dataset
66
from ragstack_ragulate.pipelines import QueryPipeline
77
from ragstack_ragulate.utils import convert_vars_to_ingredients
88

9-
if TYPE_CHECKING:
10-
from argparse import ArgumentParser, _SubParsersAction
119

12-
13-
def setup_query(subparsers: _SubParsersAction[ArgumentParser]) -> None:
10+
def setup_query(subparsers) -> None: # type: ignore[no-untyped-def]
1411
"""Setup the query command."""
1512
query_parser = subparsers.add_parser("query", help="Run a query pipeline")
1613
query_parser.add_argument(

libs/ragulate/ragstack_ragulate/cli_commands/run.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING, Any
3+
from typing import Any
44

55
from ragstack_ragulate.analysis import Analysis
66
from ragstack_ragulate.config import ConfigParser
77
from ragstack_ragulate.logging_config import logger
88
from ragstack_ragulate.pipelines import IngestPipeline, QueryPipeline
99

10-
if TYPE_CHECKING:
11-
from argparse import ArgumentParser, _SubParsersAction
1210

13-
14-
def setup_run(subparsers: _SubParsersAction[ArgumentParser]) -> None:
11+
def setup_run(subparsers) -> None: # type: ignore[no-untyped-def]
1512
"""Setup the run command."""
1613
run_parser = subparsers.add_parser(
1714
"run", help="Run an experiment from a config file"

libs/ragulate/ragstack_ragulate/pipelines/query_pipeline.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from tqdm import tqdm
1010
from trulens_eval import Tru, TruChain
11-
from trulens_eval.feedback.provider import AzureOpenAI, Huggingface, LLMProvider, OpenAI
11+
from trulens_eval.feedback.provider import AzureOpenAI, Huggingface, OpenAI
1212
from trulens_eval.schema.feedback import FeedbackMode, FeedbackResultStatus
1313
from typing_extensions import Never, override
1414

@@ -19,6 +19,8 @@
1919
from .feedbacks import Feedbacks
2020

2121
if TYPE_CHECKING:
22+
from trulens_eval.feedback.provider.base import LLMProvider
23+
2224
from ragstack_ragulate.datasets import BaseDataset, QueryItem
2325

2426

0 commit comments

Comments
 (0)