예제 #1
0
파일: server.py 프로젝트: inq/dotemacs
    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)
예제 #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')
예제 #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)
예제 #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')