Skip to content

Commit 51d4c45

Browse files
committed
ruff
1 parent 3f06e59 commit 51d4c45

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/codegen/sdk/core/codebase.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,16 +1085,8 @@ def set_session_options(self, **kwargs: Unpack[SessionOptions]) -> None:
10851085
self.G.transaction_manager.set_max_transactions(self.G.session_options.max_transactions)
10861086
self.G.transaction_manager.reset_stopwatch(self.G.session_options.max_seconds)
10871087

1088-
10891088
@classmethod
1090-
def fetch_codebase(
1091-
cls,
1092-
repo_name: str,
1093-
*,
1094-
tmp_dir: str | None = None,
1095-
shallow: bool = True,
1096-
commit_hash: str | None = None
1097-
) -> "Codebase":
1089+
def fetch_codebase(cls, repo_name: str, *, tmp_dir: str | None = None, shallow: bool = True, commit_hash: str | None = None) -> "Codebase":
10981090
"""Fetches a codebase from GitHub and returns a Codebase instance.
10991091
11001092
Args:
@@ -1149,15 +1141,15 @@ def fetch_codebase(
11491141

11501142
# Initialize and return codebase with proper context
11511143
logger.info("Initializing Codebase...")
1152-
project = ProjectConfig(repo_operator=repo_operator,
1153-
programming_language=determine_project_language(repo_path))
1144+
project = ProjectConfig(repo_operator=repo_operator, programming_language=determine_project_language(repo_path))
11541145
codebase = Codebase(projects=[project], config=DefaultConfig)
11551146
logger.info("Codebase initialization complete")
11561147
return codebase
11571148
except Exception as e:
11581149
logger.error(f"Failed to initialize codebase: {e}")
11591150
raise
11601151

1152+
11611153
# The last 2 lines of code are added to the runner. See codegen-backend/cli/generate/utils.py
11621154
# Type Aliases
11631155
CodebaseType = Codebase[SourceFile, Directory, Symbol, Class, Function, Import, Assignment, Interface, TypeAlias, Parameter, CodeBlock]

0 commit comments

Comments
 (0)