extend black formatting to tests as well

This commit is contained in:
Anthony Sottile 2021-04-18 09:17:48 -07:00
parent a7174759e9
commit af1668bf04
45 changed files with 1644 additions and 1307 deletions

View file

@ -18,14 +18,14 @@ def test_all_pyflakes_messages_have_flake8_codes_assigned():
def test_undefined_local_code():
"""In pyflakes 2.1.0 this code's string formatting was changed."""
src = '''\
src = """\
import sys
def f():
sys = sys
'''
"""
tree = ast.parse(src)
checker = pyflakes_shim.FlakesChecker(tree, (), 't.py')
checker = pyflakes_shim.FlakesChecker(tree, (), "t.py")
message_texts = [s for _, _, s, _ in checker.run()]
assert message_texts == [
"F823 local variable 'sys' defined in enclosing scope on line 1 referenced before assignment", # noqa: E501