Exemplo n.º 1
0
    def rpc_fix_code(self, source):
        """Formats Python code to conform to the PEP 8 style guide.

        """
        source = get_source(source)
        return fix_code(source)
Exemplo n.º 2
0
 def test_fix_code(self):
     code_block = 'x=       123\n'
     new_block = auto_pep8.fix_code(code_block)
     self.assertEqual(new_block, 'x = 123\n')
Exemplo n.º 3
0
    def rpc_fix_code(self, source):
        """Formats Python code to conform to the PEP 8 style guide.

        """
        source = get_source(source)
        return fix_code(source)
Exemplo n.º 4
0
 def test_fix_code(self):
     code_block = 'x=       123\n'
     new_block = auto_pep8.fix_code(code_block, os.getcwd())
     self.assertEqual(new_block, 'x = 123\n')