Skip to content

Commit c8dd607

Browse files
committed
Fixed lint errors
1 parent a4659b4 commit c8dd607

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

jupyter_ai_tools/toolkits/file_system.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ async def search_and_replace(
189189
return f"Error: Failed to search and edit file: {str(e)}"
190190

191191

192-
async def glob(pattern: str, path: Optional[str] = None) -> List[str]:
192+
async def glob(pattern: str, path: Optional[str] = None) -> str:
193193
"""Searches for files that matches the glob pattern
194194
195195
Args:
@@ -296,10 +296,10 @@ async def ls(path: str, ignore: Optional[List[str]] = None) -> str:
296296
"""
297297
try:
298298
if not os.path.exists(path):
299-
return [f"Error: Path not found: {path}"]
299+
return f"Error: Path not found: {path}"
300300

301301
if not os.path.isdir(path):
302-
return [f"Error: Not a directory: {path}"]
302+
return f"Error: Not a directory: {path}"
303303

304304
# Get all files and directories in the given path
305305
items = await asyncio.to_thread(os.listdir, path)
@@ -329,7 +329,7 @@ async def ls(path: str, ignore: Optional[List[str]] = None) -> str:
329329

330330
return "\n".join(full_paths)
331331
except Exception as e:
332-
return [f"Error: Failed to list directory: {str(e)}"]
332+
return f"Error: Failed to list directory: {str(e)}"
333333

334334

335335
toolkit = Toolkit(

jupyter_ai_tools/toolkits/notebook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def _get_cell_index_from_id_nbformat(notebook, cell_id: str) -> int | None:
223223
return None
224224

225225

226-
def _determine_insert_index(cells_count: int, cell_index: int, add_above: bool) -> int:
226+
def _determine_insert_index(cells_count: int, cell_index: str, add_above: bool) -> int:
227227
if cell_index is None:
228228
insert_index = cells_count
229229
else:

0 commit comments

Comments
 (0)