From 0100afb01399e4605a68daec0e7b447e163e0b1d Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 7 Jul 2014 19:12:39 -0400 Subject: [PATCH] [1.7.x] Fixed flake8 errors. Backport of fddd95254e from master --- django/utils/autoreload.py | 1 + tests/utils_tests/test_autoreload.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/django/utils/autoreload.py b/django/utils/autoreload.py index e75ee5a15c..1037eff384 100644 --- a/django/utils/autoreload.py +++ b/django/utils/autoreload.py @@ -80,6 +80,7 @@ _error_files = [] _cached_modules = set() _cached_filenames = [] + def gen_filenames(only_new=False): """ Returns a list of filenames referenced in sys.modules and translation diff --git a/tests/utils_tests/test_autoreload.py b/tests/utils_tests/test_autoreload.py index 463cc1bcd0..8cda975ec6 100644 --- a/tests/utils_tests/test_autoreload.py +++ b/tests/utils_tests/test_autoreload.py @@ -76,8 +76,8 @@ class TestFilenameGenerator(TestCase): When calling a second time gen_filenames with only_new = True, only files from newly loaded modules should be given. """ - filenames1 = list(gen_filenames()) - from fractions import Fraction + list(gen_filenames()) + from fractions import Fraction # NOQA filenames2 = list(gen_filenames(only_new=True)) self.assertEqual(len(filenames2), 1) self.assertTrue(filenames2[0].endswith('fractions.py'))