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

Assertion Check for Misspelled Parameters #17

Closed
cancan101 opened this issue Jan 5, 2015 · 1 comment
Closed

Assertion Check for Misspelled Parameters #17

cancan101 opened this issue Jan 5, 2015 · 1 comment

Comments

@cancan101
Copy link
Contributor

See discussion:

Would be cool to have some assertion for unused parameters to catch issues like this.

@cancan101
Copy link
Contributor Author

def check_for_unused_kwargs(self):
    names = [n for n, _ in self.layers] + ['update']

    for k in self._kwarg_keys:
        for n in names:
            prefix = '{}_'.format(n)
            if k.startswith(prefix):
                break
        else:
            print "Unused key: %s" % k

@dnouri dnouri closed this as completed in a07037b Feb 8, 2015
dnouri added a commit that referenced this issue Feb 8, 2015
…ameters

Fixes #17: Assertion Check for Misspelled Parameters
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

No branches or pull requests

1 participant