Clean up pylint errors to get diff-quality to pass
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# pylint: disable=missing-docstring,unused-argument,model-missing-unicode
|
||||
# pylint: disable=missing-docstring,unused-argument
|
||||
|
||||
|
||||
import json
|
||||
|
||||
@@ -41,7 +41,6 @@ class CountryMiddleware(MiddlewareMixin):
|
||||
reader = geoip2.database.Reader(settings.GEOIP_PATH)
|
||||
try:
|
||||
response = reader.country(new_ip_address)
|
||||
# pylint: disable=no-member
|
||||
country_code = response.country.iso_code
|
||||
except geoip2.errors.AddressNotFoundError:
|
||||
country_code = ""
|
||||
|
||||
@@ -4,9 +4,6 @@ Test site_configuration middleware.
|
||||
"""
|
||||
|
||||
|
||||
from mock import patch
|
||||
|
||||
from django.conf import settings
|
||||
from django.test import TestCase
|
||||
from django.test.client import Client
|
||||
from django.test.utils import override_settings
|
||||
|
||||
Reference in New Issue
Block a user