Skip to content

Commit

Permalink
add unit test for e501 not effected with f-string
Browse files Browse the repository at this point in the history
  • Loading branch information
hhatto committed Mar 17, 2024
1 parent 3087ac4 commit b19bfe6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/test_autopep8.py
Original file line number Diff line number Diff line change
Expand Up @@ -3954,6 +3954,13 @@ def test_e501_with_pep572_assignment_expressions(self):
with autopep8_context(line, options=['-aa']) as result:
self.assertEqual(line, result)

def test_e501_not_effected_with_fstring(self):
line = """\
connector = f"socks5://{user}:{password}:{url}:{port}"
"""
with autopep8_context(line) as result:
self.assertEqual(line, result)

def test_e502(self):
line = "print('abc'\\\n 'def')\n"
fixed = "print('abc'\n 'def')\n"
Expand Down

0 comments on commit b19bfe6

Please sign in to comment.