mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #27463 -- Fixed E741 flake8 warnings.
This commit is contained in:
parent
c7bfcd2f37
commit
0a63ef3f61
18 changed files with 90 additions and 83 deletions
|
@ -181,15 +181,15 @@ class WriterTests(SimpleTestCase):
|
|||
"""
|
||||
|
||||
def safe_exec(self, string, value=None):
|
||||
l = {}
|
||||
d = {}
|
||||
try:
|
||||
exec(force_str(string), globals(), l)
|
||||
exec(force_str(string), globals(), d)
|
||||
except Exception as e:
|
||||
if value:
|
||||
self.fail("Could not exec %r (from value %r): %s" % (string.strip(), value, e))
|
||||
else:
|
||||
self.fail("Could not exec %r: %s" % (string.strip(), e))
|
||||
return l
|
||||
return d
|
||||
|
||||
def serialize_round_trip(self, value):
|
||||
string, imports = MigrationWriter.serialize(value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue