Skip to content

[WIP] BF: Check for attribute existence before value #368

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

Closed
wants to merge 2 commits into from

Conversation

effigies
Copy link
Member

Indentation seemed to be erroneous, as the presence of keyword arguments should not be prerequisite for *args and **kwargs.

Closes #366.

paren_or_comma()
self.write('**')
self.visit(node.kwargs)
if hasattr(node, 'starargs'):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this cause downstream problems if node.starargs is None?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woops, fixed.

@bcipolli
Copy link
Contributor

Is there test coverage of this codepath? It is explicitly omitted from .coveragerc.

@effigies
Copy link
Member Author

Added the check in the wrong place, but if there's a possibility of failure in visit_Call, might there not also be a possibility in visit_ClassDef?

Someone with more experience fiddling with the AST should probably review this.

@effigies effigies closed this Oct 29, 2015
@effigies effigies deleted the issue-366 branch November 7, 2015 14:16
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