Last active
August 29, 2015 14:01
-
-
Save shidarin/06e59191ab0c7f26c1c3 to your computer and use it in GitHub Desktop.
Hanging Indent Issues with PyLint 0.2.1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
def parse_args(): | |
parser = argparse.ArgumentParser() | |
# No trigger | |
parser.add_argument( | |
"no indent", | |
help="this isn't going to have an indent" | |
) | |
# No trigger | |
parser.add_argument( | |
"line continued indent", | |
help="Of course the irony of the line continuation is that my IDE " \ | |
"now complains about the unneeded \\" | |
) | |
# No trigger | |
parser.add_argument( | |
"this seems to what 1.2.1 wants", | |
help="this doesn't help distinguish between multiple arguments on" | |
"multiple lines. It looks messing, it's hard to figure out, and " | |
"it doesn't contribute to readable code." | |
) | |
# Triggers in 1.2.1 | |
parser.add_argument( | |
"now broken in 1.2.1", | |
help="this type of indent with no \\ is now disallowed in 1.2.1, " | |
"despite it's pleasing looks and lack of superfluous slashes." | |
) | |
# Triggers in 1.2.1 (and probably should) | |
parser.add_argument( | |
"what about different spacing", | |
help="let's try a line contunuation with a strict 4 space continuation" | |
"like this." | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This triggers the following errors for me in pylint 1.2.1: