Skip to content

Commit

Permalink
make mypi happy
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobello committed Jun 28, 2024
1 parent ad8a314 commit 68d594d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion parllama/data_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def create_model(
) -> Iterator[Dict[str, Any]]:
"""Create a new model."""
return ollama.create(
model=model_name, modelfile=model_code, quantize=quantize_level, stream=True
model=model_name, modelfile=str(model_code), quantize=quantize_level, stream=True
) # type: ignore

@staticmethod
Expand Down
4 changes: 2 additions & 2 deletions parllama/widgets/local_model_view.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Local Model View"""

from functools import partial
from typing import List
from typing import List, cast

from textual import on
from textual.app import ComposeResult
Expand Down Expand Up @@ -169,7 +169,7 @@ def on_model_data_loaded(self, msg: LocalModelListLoaded) -> None:
self.grid.loading = False
if self.search_input.value:
self.grid.filter(self.search_input.value)
if self.parent.has_focus:
if self.parent and cast(Widget, self.parent).has_focus:
if model_name:
self.grid.select_by_name(model_name)
else:
Expand Down

0 comments on commit 68d594d

Please sign in to comment.