Remove unused imports and pep8 errors

This commit is contained in:
Roland Geider
2015-02-08 16:22:34 +01:00
parent 049c0fb58d
commit fb558b1d23
16 changed files with 6 additions and 40 deletions

View File

@@ -13,16 +13,10 @@
# You should have received a copy of the GNU Affero General Public License
import logging
import datetime
import decimal
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
from wger.core.models import UserProfile
from wger.core.tests import api_base_test
from wger.utils.constants import TWOPLACES
from wger.weight.models import WeightEntry
from wger.manager.tests.testcase import WorkoutManagerTestCase
logger = logging.getLogger(__name__)

View File

@@ -18,8 +18,6 @@ import decimal
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
from wger.core.models import UserProfile
from wger.core.tests import api_base_test
from wger.utils.constants import TWOPLACES
from wger.weight.models import WeightEntry

View File

@@ -12,15 +12,9 @@
#
# You should have received a copy of the GNU Affero General Public License
import datetime
from django.contrib.auth.models import User
from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType
from django.core.urlresolvers import reverse
from wger.core.models import UserProfile
from wger.gym.models import Gym
from wger.manager.tests.testcase import WorkoutManagerTestCase
from wger.manager.tests.testcase import WorkoutManagerEditTestCase

View File

@@ -30,8 +30,6 @@ from django.core.urlresolvers import reverse
from django.core import mail
from django.core.cache import cache
from django.core.validators import MinLengthValidator
from easy_thumbnails.signals import saved_file
from easy_thumbnails.signal_handlers import generate_aliases
from wger.core.models import Language
from wger.utils.managers import SubmissionManager

View File

@@ -15,9 +15,8 @@
from django.core import mail
from django.core.urlresolvers import reverse
from wger.exercises.models import Exercise, ExerciseImage
from wger.exercises.models import ExerciseImage
from wger.manager.tests.testcase import STATUS_CODES_FAIL
from wger.manager.tests.testcase import WorkoutManagerTestCase

View File

@@ -23,7 +23,6 @@ from django.http import HttpResponseForbidden
from django.forms import ModelForm
from django.forms import ModelChoiceField
from django.forms import ModelMultipleChoiceField
from django.core import mail
from django.core.cache import cache
from django.core.urlresolvers import reverse
from django.core.urlresolvers import reverse_lazy

View File

@@ -19,9 +19,7 @@ import datetime
from django.http import HttpResponse
from django.http import HttpResponseForbidden
from django.core.urlresolvers import reverse
from django.shortcuts import get_object_or_404
from django.contrib.auth.decorators import login_required
from django.utils.translation import ugettext as _
from wger.manager.models import Workout

View File

@@ -19,7 +19,6 @@ import logging
from django.shortcuts import render
from django.shortcuts import get_object_or_404
from django.http import HttpResponseRedirect
from django.http import HttpResponseForbidden
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy
from django.utils.translation import ugettext as _

View File

@@ -25,7 +25,6 @@ from icalendar.tools import UIDGenerator
from django.shortcuts import get_object_or_404
from django.http import HttpResponse
from django.http import HttpResponseForbidden
from django.contrib.auth.decorators import login_required
from django.conf import settings
from django.contrib.sites.models import Site

View File

@@ -170,7 +170,7 @@ def add(request, pk):
WorkoutLogFormSet = modelformset_factory(WorkoutLog,
form=WorkoutLogForm,
exclude=('date', 'workout'),
extra = total_sets)
extra=total_sets)
# Process the request
if request.method == 'POST':

View File

@@ -14,7 +14,6 @@
# along with Workout Manager. If not, see <http://www.gnu.org/licenses/>.
from django.conf import settings
from django.core.urlresolvers import reverse
from django.templatetags.static import static
from wger import get_version

View File

@@ -21,17 +21,6 @@ from wger.utils.widgets import Html5FormTimeField
logger = logging.getLogger(__name__)
#
#
# Please note: it is necessary to import these fields with these names,
# otherwise migrating from older versions will not work. Only if the migrations
# are squashed one day (perhaps with django 1.7), can the imports be removed.
#
#
from django.db.models import DecimalField as Html5DecimalField
from django.db.models import FloatField as Html5FloatField
from django.db.models import IntegerField as Html5IntegerField
class Html5TimeField(models.TimeField):
'''

View File

@@ -16,7 +16,7 @@ from django.contrib.auth.models import User, AnonymousUser
from django.http import Http404
from wger.manager.tests.testcase import WorkoutManagerTestCase
from wger.utils.helpers import check_access, make_uid
from wger.utils.helpers import check_access
class CheckAccessTestCase(WorkoutManagerTestCase):

View File

@@ -15,7 +15,7 @@
import logging
from decimal import Decimal
from wger.utils.constants import TWOPLACES, FOURPLACES
from wger.utils.constants import FOURPLACES
logger = logging.getLogger(__name__)

View File

@@ -19,7 +19,7 @@ import csv
import datetime
from django.shortcuts import render
from django.http import HttpResponse, HttpResponseForbidden
from django.http import HttpResponse
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.core.urlresolvers import reverse_lazy

View File

@@ -14,13 +14,13 @@ framework.
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
# This application object is used by any WSGI server configured to use this
# file. This includes Django's development server, if the WSGI_APPLICATION
# setting points here.
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
# Apply WSGI middleware here.