Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

address some of the ruff warnings #765

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions server/continuedev/core/steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from ..libs.util.devdata import dev_data_logger
from ..libs.util.strings import (
dedent_and_get_common_whitespace,
remove_quotes_and_escapes,
)
from ..libs.util.telemetry import posthog_logger
from ..libs.util.templating import render_prompt_template
Expand All @@ -24,8 +23,6 @@
ChatMessage,
ContextItem,
ContinueCustomException,
DeltaStep,
SessionUpdate,
SetStep,
Step,
)
Expand Down
3 changes: 1 addition & 2 deletions server/continuedev/libs/index/pipelines/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from ..hyde import code_hyde
from ..indices.chroma_index import ChromaCodebaseIndex
from ..indices.meilisearch_index import MeilisearchCodebaseIndex
from ..rerankers.default import default_reranker_parallel
from ..rerankers.single_token import single_token_reranker_parallel


Expand Down Expand Up @@ -59,7 +58,7 @@ async def main_retrieval_pipeline(
)
# Rerank to select top results
if use_reranking:
print(f"Selecting most important files...")
print("Selecting most important files...")
chunks = await single_token_reranker_parallel(
chunks,
query,
Expand Down
1 change: 1 addition & 0 deletions server/continuedev/libs/util/copy_codebase.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from watchdog.events import PatternMatchingEventHandler
from watchdog.observers import Observer

from ...libs.util import calculate_diff
from ...core.autopilot import Autopilot
from ...models.filesystem import FileSystem
from ...models.main import (
Expand Down Expand Up @@ -100,7 +101,7 @@
if edit is None:
return
edit = edit.with_mapped_paths(self.orig_root, self.copy_root)
action = ManualEditAction(edit)

Check failure on line 104 in server/continuedev/libs/util/copy_codebase.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (F821)

continuedev/libs/util/copy_codebase.py:104:18: F821 Undefined name `ManualEditAction`
self.autopilot.act(action)


Expand Down
2 changes: 1 addition & 1 deletion server/continuedev/plugins/recipes/TemplateRecipe/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Coroutine

from ....core.main import Observation, Step
from ....core.main import Step
from ....core.sdk import ContinueSDK, Models


Expand Down
2 changes: 1 addition & 1 deletion server/continuedev/plugins/steps/codebase.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
from typing import List, Optional, Union

from ...core.config import ModelDescription, RetrievalSettings
from ...core.config import RetrievalSettings
from ...core.main import (
ContextItem,
ContextItemDescription,
Expand Down
2 changes: 0 additions & 2 deletions server/continuedev/plugins/steps/steps_on_startup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from typing import Type

from ...core.main import Step
from ...core.sdk import ContinueSDK, Models

Expand Down