Skip to content

Commit

Permalink
Merge 06be525 into 462069e
Browse files Browse the repository at this point in the history
  • Loading branch information
jakuub committed Feb 14, 2019
2 parents 462069e + 06be525 commit 5d7fb0c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion autopep8.py
Expand Up @@ -81,7 +81,7 @@ class documentation for more information.
COMPARE_NEGATIVE_REGEX = re.compile(r'\b(not)\s+([^][)(}{]+?)\s+(in|is)\s')
COMPARE_NEGATIVE_REGEX_THROUGH = re.compile(r'\b(not\s+in|is\s+not)\s')
BARE_EXCEPT_REGEX = re.compile(r'except\s*:')
STARTSWITH_DEF_REGEX = re.compile(r'^(async\s+def|def)\s.*\):')
STARTSWITH_DEF_REGEX = re.compile(r'^\s*(async\s+def|def)\s.*\):')
DOCSTRING_START_REGEX = re.compile(r'^u?r?(?P<kind>["\']{3})')

EXIT_CODE_OK = 0
Expand Down
6 changes: 6 additions & 0 deletions test/test_autopep8.py
Expand Up @@ -3933,6 +3933,12 @@ def test_e704_not_work_with_aa_option(self):
with autopep8_context(line, options=['-aa', '--select=E704']) as result:
self.assertEqual(line, result)

def test_e704_indented(self):
line = 'class C:\n def f(x): return 2*x\n'
fixed = 'class C:\n def f(x):\n return 2 * x\n'
with autopep8_context(line, options=['-aaa']) as result:
self.assertEqual(fixed, result)

def test_e711(self):
line = 'foo == None\n'
fixed = 'foo is None\n'
Expand Down

0 comments on commit 5d7fb0c

Please sign in to comment.