Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom ignore parameter in LdaModel.save #315

Merged
merged 8 commits into from
Aug 10, 2015

Conversation

mattilyra
Copy link
Contributor

In LdaModel.save the ignore list is explicitly passed to the parent method, making it impossible to add anything to that list. I propose that the ignore list be handled in the following way instead.

if 'ignore' in kwargs:
    kwargs['ignore'] = list(set(['state', 'dispatcher']) | set(kwargs['ignore']))
else:
    kwargs['ignore'] = ['state', 'dispatcher']
super(LdaModel, self).save(fname, *args, **kwargs)

…s passing in custom ignore parameters as well.
…tly and added a check to LdaModel.save to make sure that the passed in is a list
@piskvorky piskvorky changed the title Issue #314 Allow custom ignore parameter in LdaModel.save Apr 8, 2015
@piskvorky
Copy link
Owner

Travis reports unittest fails for Python 3; we use six for dual compatibility.

For example, basestring in Python 2 becomes six.string_types for Py 2 & 3.

@mattilyra
Copy link
Contributor Author

I somehow forgot that this was still open. I fixed it now and the tests pass. Upstream develop has been merged into the latest commit.

@piskvorky
Copy link
Owner

Looks good. Thanks @mattilyra !

piskvorky added a commit that referenced this pull request Aug 10, 2015
Allow custom `ignore` parameter in LdaModel.save
@piskvorky piskvorky merged commit 3f210e4 into piskvorky:develop Aug 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants