How to use the autopep8.fix_e269 function in autopep8

To help you get started, we’ve selected a few autopep8 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hhatto / autopep8 / test / test_autopep8.py View on Github external
def test_format_block_comments(self):
        self.assertEqual(
            '# abc',
            autopep8.fix_e269('#abc'))

        self.assertEqual(
            '# abc',
            autopep8.fix_e269('####abc'))

        self.assertEqual(
            '# abc',
            autopep8.fix_e269('##   #   ##abc'))
github hhatto / autopep8 / test / test_autopep8.py View on Github external
def test_format_block_comments_should_leave_outline_alone(self):
        line = """\
###################################################################
##   Some people like these crazy things. So leave them alone.   ##
###################################################################
"""
        self.assertEqual(line, autopep8.fix_e269(line))

        line = """\
#################################################################
#   Some people like these crazy things. So leave them alone.   #
#################################################################
"""
        self.assertEqual(line, autopep8.fix_e269(line))
github hhatto / autopep8 / test / test_autopep8.py View on Github external
def test_format_block_comments_should_not_corrupt_special_comments(self):
        self.assertEqual(
            '#: abc',
            autopep8.fix_e269('#: abc'))

        self.assertEqual(
            '#!/bin/bash\n',
            autopep8.fix_e269('#!/bin/bash\n'))
github hhatto / autopep8 / test / test_autopep8.py View on Github external
def test_format_block_comments(self):
        self.assertEqual(
            '# abc',
            autopep8.fix_e269('#abc'))

        self.assertEqual(
            '# abc',
            autopep8.fix_e269('####abc'))

        self.assertEqual(
            '# abc',
            autopep8.fix_e269('##   #   ##abc'))
github hhatto / autopep8 / test / test_autopep8.py View on Github external
def test_format_block_comments_should_only_touch_real_comments(self):
        commented_out_code = '#x = 1'
        self.assertEqual(
            commented_out_code,
            autopep8.fix_e269(commented_out_code))
github hhatto / autopep8 / test / test_autopep8.py View on Github external
def test_format_block_comments_should_not_corrupt_special_comments(self):
        self.assertEqual(
            '#: abc',
            autopep8.fix_e269('#: abc'))

        self.assertEqual(
            '#!/bin/bash\n',
            autopep8.fix_e269('#!/bin/bash\n'))
github hhatto / autopep8 / test / test_autopep8.py View on Github external
def test_format_block_comments_should_leave_outline_alone(self):
        line = """\
###################################################################
##   Some people like these crazy things. So leave them alone.   ##
###################################################################
"""
        self.assertEqual(line, autopep8.fix_e269(line))

        line = """\
#################################################################
#   Some people like these crazy things. So leave them alone.   #
#################################################################
"""
        self.assertEqual(line, autopep8.fix_e269(line))
github hhatto / autopep8 / test / test_autopep8.py View on Github external
def test_format_block_comments_with_multiple_lines(self):
        self.assertEqual(
            """\
# abc
  # blah blah
    # four space indentation
''' #do not modify strings
#do not modify strings
#do not modify strings
#do not modify strings'''
#
""",
            autopep8.fix_e269("""\
# abc
github hhatto / autopep8 / test / test_autopep8.py View on Github external
def test_format_block_comments(self):
        self.assertEqual(
            '# abc',
            autopep8.fix_e269('#abc'))

        self.assertEqual(
            '# abc',
            autopep8.fix_e269('####abc'))

        self.assertEqual(
            '# abc',
            autopep8.fix_e269('##   #   ##abc'))