Commit 3169b73a authored by Florent Chehab's avatar Florent Chehab

pylint update

parent 810d42ed
......@@ -96,7 +96,7 @@ class DictModeViewSet(viewsets.ModelViewSet):
"""
def list(self, request, *args, **kwargs):
response = super(viewsets.ModelViewSet, self).list(
response = super(viewsets.ModelViewSet, self).list( # pylint: disable=E1003
request, *args, **kwargs) # call the original 'list'
pk_attr_name = self.serializer_class.Meta.model._meta.pk.name
response.data = {
......@@ -107,7 +107,7 @@ class DictModeViewSet(viewsets.ModelViewSet):
class CountryViewSet(DictModeViewSet):
permission_classes = (permissions.DjangoModelPermissions,)
queryset = Country.objects.all() # noqa: E1101
queryset = Country.objects.all() # pylint: disable=E1101
serializer_class = CountrySerializer
......@@ -135,7 +135,7 @@ class RegionSerializer(serializers.ModelSerializer):
class RegionViewSet(DictModeViewSet):
permission_classes = (permissions.DjangoModelPermissions,)
queryset = Region.objects.all() # noqa: E1101
queryset = Region.objects.all() # pylint: disable=E1101
serializer_class = RegionSerializer
......@@ -156,5 +156,5 @@ class CitySerializer(serializers.ModelSerializer):
class CityViewSet(DictModeViewSet):
permission_classes = (permissions.DjangoModelPermissions,)
queryset = City.objects.all() # noqa: E1101
queryset = City.objects.all() # pylint: disable=E1101
serializer_class = CitySerializer
......@@ -58,5 +58,5 @@ class MainCampusSerializer(serializers.ModelSerializer):
class MainCampusViewSet(viewsets.ModelViewSet): # TODO switch to dict
permission_classes = (permissions.DjangoModelPermissions,)
queryset = MainCampus.objects.all() # noqa: E1101
queryset = MainCampus.objects.all() # pylint: disable=E1101
serializer_class = MainCampusSerializer
......@@ -19,4 +19,4 @@ class University(models.Model):
MainCampus, on_delete=models.PROTECT, related_name='main_campus_of')
def localization(self):
return self.main_campus.localization()
return self.main_campus.localization() # pylint: disable=E1101
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment