misc: pylint fix useless-object-inheritance (#52630)
This commit is contained in:
parent
7e518f429b
commit
8f450f5a2f
|
@ -4355,7 +4355,7 @@ def test_backoffice_criticality_formdata_view(pub):
|
|||
assert 'Criticality Level: red' in resp.text
|
||||
|
||||
|
||||
class IHateUnicode(object):
|
||||
class IHateUnicode:
|
||||
def __unicode__(self):
|
||||
raise Exception('HATE!!')
|
||||
|
||||
|
|
|
@ -259,7 +259,7 @@ def test_json_datasource(pub, requests_pub, http_requests):
|
|||
# json specified with a variadic url
|
||||
get_request().datasources_cache = {}
|
||||
|
||||
class JsonUrlPath(object):
|
||||
class JsonUrlPath:
|
||||
def get_substitution_variables(self):
|
||||
return {'json_url': 'file://%s' % json_file_path}
|
||||
|
||||
|
@ -273,7 +273,7 @@ def test_json_datasource(pub, requests_pub, http_requests):
|
|||
# same with django templated url
|
||||
get_request().datasources_cache = {}
|
||||
|
||||
class JsonUrlPath(object):
|
||||
class JsonUrlPath:
|
||||
def get_substitution_variables(self):
|
||||
return {'json_url': 'file://%s' % json_file_path}
|
||||
|
||||
|
@ -287,7 +287,7 @@ def test_json_datasource(pub, requests_pub, http_requests):
|
|||
# json specified with a variadic url with an erroneous space
|
||||
get_request().datasources_cache = {}
|
||||
|
||||
class JsonUrlPath(object):
|
||||
class JsonUrlPath:
|
||||
def get_substitution_variables(self):
|
||||
return {'json_url': 'file://%s' % json_file_path}
|
||||
|
||||
|
@ -301,7 +301,7 @@ def test_json_datasource(pub, requests_pub, http_requests):
|
|||
# same with django templated url
|
||||
get_request().datasources_cache = {}
|
||||
|
||||
class JsonUrlPath(object):
|
||||
class JsonUrlPath:
|
||||
def get_substitution_variables(self):
|
||||
return {'json_url': 'file://%s' % json_file_path}
|
||||
|
||||
|
@ -606,7 +606,7 @@ def test_geojson_datasource(pub, requests_pub, http_requests):
|
|||
# geojson specified with a variadic url
|
||||
get_request().datasources_cache = {}
|
||||
|
||||
class GeoJSONUrlPath(object):
|
||||
class GeoJSONUrlPath:
|
||||
def get_substitution_variables(self):
|
||||
return {'geojson_url': 'file://%s' % geojson_file_path}
|
||||
|
||||
|
@ -630,7 +630,7 @@ def test_geojson_datasource(pub, requests_pub, http_requests):
|
|||
# same with django templated url
|
||||
get_request().datasources_cache = {}
|
||||
|
||||
class GeoJSONUrlPath(object):
|
||||
class GeoJSONUrlPath:
|
||||
def get_substitution_variables(self):
|
||||
return {'geojson_url': 'file://%s' % geojson_file_path}
|
||||
|
||||
|
@ -654,7 +654,7 @@ def test_geojson_datasource(pub, requests_pub, http_requests):
|
|||
# geojson specified with a variadic url with an erroneous space
|
||||
get_request().datasources_cache = {}
|
||||
|
||||
class GeoJSONUrlPath(object):
|
||||
class GeoJSONUrlPath:
|
||||
def get_substitution_variables(self):
|
||||
return {'geojson_url': 'file://%s' % geojson_file_path}
|
||||
|
||||
|
@ -678,7 +678,7 @@ def test_geojson_datasource(pub, requests_pub, http_requests):
|
|||
# same with django templated url
|
||||
get_request().datasources_cache = {}
|
||||
|
||||
class GeoJSONUrlPath(object):
|
||||
class GeoJSONUrlPath:
|
||||
def get_substitution_variables(self):
|
||||
return {'geojson_url': 'file://%s' % geojson_file_path}
|
||||
|
||||
|
|
|
@ -624,7 +624,7 @@ def test_distance():
|
|||
assert t.render({'c1': {'lat': '48', 'lon': '2'}, 'c2': {'lat': '48.1', 'lng': '2.1'}}) == '13387.2'
|
||||
assert t.render({'c1': {'lat': '48', 'lng': '2'}, 'c2': {'lat': '48.1', 'lng': '2.1'}}) == '13387.2'
|
||||
|
||||
class MockFormData(object):
|
||||
class MockFormData:
|
||||
formdef = None
|
||||
geolocations = {'base': {'lat': 48, 'lon': 2}}
|
||||
|
||||
|
@ -692,7 +692,7 @@ def test_get_on_lazy_var():
|
|||
|
||||
|
||||
def test_reproj():
|
||||
class MockFormData(object):
|
||||
class MockFormData:
|
||||
formdef = None
|
||||
geolocations = {'base': {'lat': 48, 'lon': 2}}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ def teardown_module(module):
|
|||
shutil.rmtree(pub.APP_DIR)
|
||||
|
||||
|
||||
class MockHtmlForm(object):
|
||||
class MockHtmlForm:
|
||||
def __init__(self, widget):
|
||||
widget = copy.deepcopy(widget)
|
||||
form = Form(method='post', use_tokens=False, enctype='application/x-www-form-urlencoded')
|
||||
|
|
|
@ -33,7 +33,7 @@ http.cookies.Morsel._reserved.setdefault('samesite', 'SameSite')
|
|||
wcs.middleware.AfterJobsMiddleware.ASYNC = False
|
||||
|
||||
|
||||
class KnownElements(object):
|
||||
class KnownElements:
|
||||
pickle_app_dir = None
|
||||
sql_app_dir = None
|
||||
sql_db_name = None
|
||||
|
@ -247,9 +247,9 @@ def login(app, username='admin', password='admin'):
|
|||
return app
|
||||
|
||||
|
||||
class EmailsMocking(object):
|
||||
class EmailsMocking:
|
||||
def create_smtp_server(self, *args, **kwargs):
|
||||
class MockSmtplibSMTP(object):
|
||||
class MockSmtplibSMTP:
|
||||
def __init__(self, mocking):
|
||||
self.mocking = mocking
|
||||
|
||||
|
@ -308,12 +308,12 @@ class EmailsMocking(object):
|
|||
sys.modules['wcs.qommon.emails'].create_smtp_server = self.wcs_create_smtp_server
|
||||
|
||||
|
||||
class MockSubstitutionVariables(object):
|
||||
class MockSubstitutionVariables:
|
||||
def get_substitution_variables(self):
|
||||
return {'bar': 'Foobar', 'foo': '1 < 3', 'email': 'sub@localhost', 'empty': ''}
|
||||
|
||||
|
||||
class HttpRequestsMocking(object):
|
||||
class HttpRequestsMocking:
|
||||
def __init__(self):
|
||||
self.requests = []
|
||||
|
||||
|
@ -409,7 +409,7 @@ class HttpRequestsMocking(object):
|
|||
|
||||
data = force_bytes(data)
|
||||
|
||||
class FakeResponse(object):
|
||||
class FakeResponse:
|
||||
def __init__(self, status, data, headers):
|
||||
self.status_code = status
|
||||
self.reason = 'whatever'
|
||||
|
|
Loading…
Reference in New Issue