Skip to content

Commit

Permalink
Remove unnecessary casting
Browse files Browse the repository at this point in the history
  • Loading branch information
RomuloSouza committed Nov 10, 2020
1 parent 4fdd821 commit 8c7bebb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rasa/nlu/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def is_model_dir(model_dir: Text) -> bool:
if any([d.is_dir() for d in dir_tree.iterdir()]): # look for subdirectories
return False

file_extenstions = [PurePath(f).suffix for f in list(dir_tree.iterdir())]
only_valid_files = all([ext in allowed_extensions for ext in file_extenstions])
file_extensions = [PurePath(f).suffix for f in dir_tree.iterdir()]
only_valid_files = all([ext in allowed_extensions for ext in file_extensions])
return only_valid_files


Expand Down

0 comments on commit 8c7bebb

Please sign in to comment.