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

Adds E133 with --hang-closing test #528

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alecklandgraf
Copy link

@alecklandgraf alecklandgraf commented Jun 2, 2016

Adds test for E133 which is enabled by the optional flag --hang-closing for issues #293

Per the docs:

The check E133 is mutually exclusive with check E123.

Specifically this throws an E133 error for

a = [
    12
]

and is Okay for

a = [
    12
    ]

@alecklandgraf alecklandgraf changed the title For Issue 293 Adds test for E133 which is enabled by the optional flag --hang-closing for Issue 293 Jun 3, 2016
@alecklandgraf alecklandgraf changed the title Adds test for E133 which is enabled by the optional flag --hang-closing for Issue 293 Adds E133 with --hang-closing test Jun 3, 2016
@sigmavirus24
Copy link
Member

I'm not quite sure I like this approach but I'm also not sure there's a better approach. :(

(mutates pep8style)

Usage in test:
#: #E133:3:1 --with-hanging
Copy link
Member

Choose a reason for hiding this comment

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

This is wrong, the usage in test would be:

#: E133:3:1 --with-hanging

Copy link
Author

Choose a reason for hiding this comment

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

Reading it over, I got the command line arg wrong too, I'll update this, should be --hang-closing not --with-hanging

@alecklandgraf
Copy link
Author

alecklandgraf commented Jun 3, 2016

I'm open to other approaches, my other thought was to have another test file, e.g. test_flags.py which could test over a set of expected errors, but that would break the current structure of having all E12X and E13X tests in the E12.py file, and might be too much overhead to keep track of.

Let me know if you'd like me to rebase.

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