Skip to content

Commit

Permalink
fix flake8 and isort errors
Browse files Browse the repository at this point in the history
  • Loading branch information
codingcatgirl committed Jan 13, 2017
1 parent a9262dd commit 53a6bdb
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 19 deletions.
1 change: 0 additions & 1 deletion src/c3nav/access/forms.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from django.forms import ModelForm, MultipleChoiceField
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy

from c3nav.access.models import AccessToken, AccessUser
from c3nav.mapdata.models import AreaLocation
Expand Down
10 changes: 4 additions & 6 deletions src/c3nav/mapdata/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
from django.conf import settings
from django.core.files import File
from django.http import Http404, HttpResponse, HttpResponseNotModified
from django.http import HttpResponseBadRequest
from django.views.decorators.csrf import csrf_exempt
from rest_framework.decorators import detail_route, list_route, api_view
from rest_framework.decorators import detail_route, list_route
from rest_framework.response import Response
from rest_framework.viewsets import ReadOnlyModelViewSet, ViewSet

Expand All @@ -19,8 +17,8 @@
from c3nav.mapdata.models.geometry import DirectedLineGeometryMapItemWithLevel
from c3nav.mapdata.search import get_location
from c3nav.mapdata.serializers.main import LevelSerializer, PackageSerializer, SourceSerializer
from c3nav.mapdata.utils.cache import (CachedReadOnlyViewSetMixin, cache_mapdata_api_response, get_levels_cached,
get_packages_cached, get_bssid_areas_cached)
from c3nav.mapdata.utils.cache import (CachedReadOnlyViewSetMixin, cache_mapdata_api_response, get_bssid_areas_cached,
get_levels_cached, get_packages_cached)


class GeometryTypeViewSet(ViewSet):
Expand Down Expand Up @@ -217,6 +215,6 @@ def wifilocate(self, request):
if area_name is not None:
location = get_location(request, area_name)
if location is not None:
return Response({'location': location.to_location_json()});
return Response({'location': location.to_location_json()})

return Response({'location': None})
2 changes: 1 addition & 1 deletion src/c3nav/mapdata/utils/cache.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from calendar import timegm
from collections import OrderedDict
from django.db.models import Q
from functools import wraps

from django.core.cache import cache
from django.db.models import Q
from django.utils.http import http_date
from rest_framework.response import Response as APIResponse
from rest_framework.views import APIView
Expand Down
10 changes: 4 additions & 6 deletions src/c3nav/routing/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
from django.conf import settings
from django.core.files import File
from django.http import Http404, HttpResponse, HttpResponseNotModified
from django.http import HttpResponseBadRequest
from django.views.decorators.csrf import csrf_exempt
from rest_framework.decorators import detail_route, list_route, api_view
from rest_framework.decorators import detail_route, list_route
from rest_framework.response import Response
from rest_framework.viewsets import ReadOnlyModelViewSet, ViewSet

Expand All @@ -19,8 +17,8 @@
from c3nav.mapdata.models.geometry import DirectedLineGeometryMapItemWithLevel
from c3nav.mapdata.search import get_location
from c3nav.mapdata.serializers.main import LevelSerializer, PackageSerializer, SourceSerializer
from c3nav.mapdata.utils.cache import (CachedReadOnlyViewSetMixin, cache_mapdata_api_response, get_levels_cached,
get_packages_cached, get_bssid_areas_cached)
from c3nav.mapdata.utils.cache import (CachedReadOnlyViewSetMixin, cache_mapdata_api_response, get_bssid_areas_cached,
get_levels_cached, get_packages_cached)


class RoutingmetryTypeViewSet(ViewSet):
Expand Down Expand Up @@ -217,6 +215,6 @@ def wifilocate(self, request):
if area_name is not None:
location = get_location(request, area_name)
if location is not None:
return Response({'location': location.to_location_json()});
return Response({'location': location.to_location_json()})

return Response({'location': None})
2 changes: 1 addition & 1 deletion src/c3nav/routing/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def get_route(self, origin: Location, destination: Location,
if not len(orig_points_i) or not len(dest_points_i):
raise AlreadyThere()

#if set(orig_points_i) & set(dest_points_i):
# if set(orig_points_i) & set(dest_points_i):
# raise AlreadyThere()

add_orig_point = origin if isinstance(origin, PointLocation) else None
Expand Down
3 changes: 1 addition & 2 deletions src/c3nav/routing/route.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from collections import OrderedDict

import copy
from collections import OrderedDict

import numpy as np
from django.utils.translation import ugettext_lazy as _
Expand Down
3 changes: 1 addition & 2 deletions src/c3nav/site/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

import qrcode
from django.core.files import File
from django.http import Http404, HttpResponse, HttpResponseNotModified
from django.http import JsonResponse
from django.http import Http404, HttpResponse, HttpResponseNotModified, JsonResponse
from django.shortcuts import get_object_or_404, redirect, render
from django.urls import reverse
from django.utils import timezone
Expand Down

0 comments on commit 53a6bdb

Please sign in to comment.