Skip to content

Commit

Permalink
Merge pull request #732 from hhatto/add-test-for-e501-with-fstring
Browse files Browse the repository at this point in the history
add unit test for e501 not effected with f-string
  • Loading branch information
hhatto committed Mar 17, 2024
2 parents 3087ac4 + b19bfe6 commit 96b7595
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/test_autopep8.py
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 96b7595

Please sign in to comment.