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

SpaceAroundEqualsInParameterDefault doesn't work properly with empty string #101

Closed
bbatsov opened this issue Apr 27, 2013 · 3 comments
Closed

Comments

@bbatsov
Copy link
Collaborator

bbatsov commented Apr 27, 2013

This piece of code will not register an offence:

def some_method(param='')

The problem is that '' has no positions associated with it in the resulting sexp.

[[[:@ident, "param", [1, 9]], [:string_literal, [:string_content]]]]

@jonas054, would you please take care of this?

@bbatsov
Copy link
Collaborator Author

bbatsov commented Apr 28, 2013

Upon further examination - the existing code does not work with [] and {} as well. It might be better to use tokens for this check instead of sexps.

@jonas054
Copy link
Collaborator

Thanks for the tip! I'll take a look.

@jonas054 jonas054 mentioned this issue Apr 29, 2013
@jonas054
Copy link
Collaborator

Can this issue be closed now?

@bbatsov bbatsov closed this as completed Apr 30, 2013
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

2 participants