Skip to content

Commit

Permalink
Fix path param of Language.__init__ always being ignored
Browse files Browse the repository at this point in the history
There was an explicitly-declared `path` keyword argument, so 'path'
would never be present in `**overrides`. This line just overwrote
any manually-specified value the user might've passed to the `path`
parameter.
  • Loading branch information
ExplodingCabbage committed Nov 20, 2016
1 parent 1988fce commit b0a07c2
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion spacy/language.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ def train(cls, path, gold_tuples, *configs):
def __init__(self, path=True, **overrides):
if 'data_dir' in overrides and 'path' not in overrides:
raise ValueError("The argument 'data_dir' has been renamed to 'path'")
path = overrides.get('path', True)
if isinstance(path, basestring):
path = pathlib.Path(path)
if path is True:
Expand Down

0 comments on commit b0a07c2

Please sign in to comment.