Skip to content

Instantly share code, notes, and snippets.

@jaytaylor
Created April 6, 2018 18:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaytaylor/3f08db5d7606e955589342597b7a2997 to your computer and use it in GitHub Desktop.
Save jaytaylor/3f08db5d7606e955589342597b7a2997 to your computer and use it in GitHub Desktop.
autopep8 command: autopep8 --pep8-passes 2000 --verbose --aggressive --aggressive --ignore=E501,E722
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import sys
def main(args):
parser = argparse.ArgumentParser(
description='Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text.. ',
argument_default=False,
)
parser.add_argument('-a', '--auto', help='Activate automatic semi-intelligent inference for --some-long-flags and --other-long-flags. '
'--some-long-flags will be activated when the primary manifold script is presented with a single-node cluster. '
'--other-long-flags will be enabled when no resources are specified in the helm overrides file.', action='store_true')
parser.add_argument('-b', '--boring-length-flag', help='Sad but true, the reality is that nobody wants to read all this documentation because it\'s only an example fragment for StackOverflow.')
parser.add_argument('-n', '--a-normal-length-flag', help='Read all about it here')
flags = parser.parse_args(args)
print('Flags=%s' % (flags,))
if __name__ == '__main__':
main(sys.argv[1:])
--- original/example-post-autopep8-formatting.py
+++ fixed/example-post-autopep8-formatting.py
@@ -3,6 +3,7 @@
import argparse
import sys
+
def main(args):
parser = argparse.ArgumentParser(
@@ -10,13 +11,14 @@
argument_default=False,
)
parser.add_argument('-a', '--auto', help='Activate automatic semi-intelligent inference for --some-long-flags and --other-long-flags. '
- '--some-long-flags will be activated when the primary manifold script is presented with a single-node cluster. '
- '--other-long-flags will be enabled when no resources are specified in the helm overrides file.', action='store_true')
+ '--some-long-flags will be activated when the primary manifold script is presented with a single-node cluster. '
+ '--other-long-flags will be enabled when no resources are specified in the helm overrides file.', action='store_true')
parser.add_argument('-b', '--boring-length-flag', help='Sad but true, the reality is that nobody wants to read all this documentation because it\'s only an example fragment for StackOverflow.')
parser.add_argument('-n', '--a-normal-length-flag', help='Read all about it here')
flags = parser.parse_args(args)
print('Flags=%s' % (flags,))
+
if __name__ == '__main__':
main(sys.argv[1:])
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import sys
def main(args):
parser = argparse.ArgumentParser(
description='Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text.. ',
argument_default=False,
)
parser.add_argument('-a', '--auto', help='Activate automatic semi-intelligent inference for --some-long-flags and --other-long-flags. '
'--some-long-flags will be activated when the primary manifold script is presented with a single-node cluster. '
'--other-long-flags will be enabled when no resources are specified in the helm overrides file.', action='store_true')
parser.add_argument('-b', '--boring-length-flag', help='Sad but true, the reality is that nobody wants to read all this documentation because it\'s only an example fragment for StackOverflow.')
parser.add_argument('-n', '--a-normal-length-flag', help='Read all about it here')
flags = parser.parse_args(args)
print('Flags=%s' % (flags,))
if __name__ == '__main__':
main(sys.argv[1:])
[file:example-post-autopep8-formatting.py]
---> Applying global fix for E265
---> Applying global fix for W604
---> Applying global fix for W603
---> Applying global fix for W601
---> Applying global fix for W690
---> Applying global fix for E231
---> Applying global fix for E721
---> 4 issue(s) to fix {'E302': set([7]), u'E128': set([13, 14]), 'E305': set([21])}
---> 0 issue(s) to fix {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment