Skip to content

Commit

Permalink
🔧 refactor(infer.py): update type hints for FastText model references
Browse files Browse the repository at this point in the history
  • Loading branch information
sudoskys committed Sep 29, 2024
1 parent d35775c commit a52eb53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fast_langdetect/ft_detect/infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ class ModelCache:
def __init__(self):
self._models = {}

def get_model(self, model_type: ModelType) -> Optional[fasttext.FastText]:
def get_model(self, model_type: ModelType) -> Optional["fasttext.FastText._FastText"]:
return self._models.get(model_type)

def set_model(self, model_type: ModelType, model: fasttext.FastText):
def set_model(self, model_type: ModelType, model: "fasttext.FastText._FastText"):
self._models[model_type] = model


Expand Down

0 comments on commit a52eb53

Please sign in to comment.