Skip to content

Commit

Permalink
Merge pull request #144 from customprogrammingsolutions/bugfix-return…
Browse files Browse the repository at this point in the history
…-type

[MRG] Fix return type bug
  • Loading branch information
oadams committed May 23, 2018
2 parents b2446dc + 3dcc646 commit aa69575
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions persephone/corpus.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ def get_test_fns(self):
""" Fetches the test set of the corpus."""
return self.prefixes_to_fns(self.test_prefixes)

def get_untranscribed_prefixes(self):
def get_untranscribed_prefixes(self) -> List[str]:

# TODO Change to pathlib.Path
untranscribed_prefix_fn = join(str(self.tgt_dir), "untranscribed_prefixes.txt")
Expand All @@ -438,10 +438,9 @@ def get_untranscribed_prefixes(self):
else:
logger.warning("Attempting to get untranscribed prefixes but the file ({})"
" that should specify these does not exist".format(untranscribed_prefix_fn))
return []

return None

def get_untranscribed_fns(self):
def get_untranscribed_fns(self) -> List[str]:
feat_fns = [os.path.join(str(self.feat_dir), "untranscribed", "%s.%s.npy" % (prefix, self.feat_type))
for prefix in self.untranscribed_prefixes]
return feat_fns
Expand Down

0 comments on commit aa69575

Please sign in to comment.