removed explicit object inheritance (#6686)

* removed explicit object inheritance

* minor fix

* pr comments

---------

Co-authored-by: Andrew Chubatiuk <andrew.chubatiuk@motional.com>
This commit is contained in:
Andrii Chubatiuk
2024-01-05 12:52:02 +02:00
committed by GitHub
parent 998dc31eb0
commit cbde237b12
21 changed files with 25 additions and 25 deletions

View File

@@ -7,7 +7,7 @@ from redash.utils import gen_query_hash, utcnow
from redash.utils.configuration import ConfigurationContainer
class ModelFactory(object):
class ModelFactory:
def __init__(self, model, **kwargs):
self.model = model
self.kwargs = kwargs
@@ -30,7 +30,7 @@ class ModelFactory(object):
return obj
class Sequence(object):
class Sequence:
def __init__(self, string):
self.sequence = 0
self.string = string
@@ -172,7 +172,7 @@ query_snippet_factory = ModelFactory(
)
class Factory(object):
class Factory:
def __init__(self):
self.org, self.admin_group, self.default_group = redash.models.init_db()
self._data_source = None

View File

@@ -6,7 +6,7 @@ from werkzeug.exceptions import BadRequest
from redash.handlers.base import paginate
class DummyResults(object):
class DummyResults:
items = [i for i in range(25)]

View File

@@ -102,7 +102,7 @@ class TestUserListResourcePost(BaseTestCase):
class TestUserListGet(BaseTestCase):
def create_filters_fixtures(self):
class PlainObject(object):
class PlainObject:
pass
result = PlainObject()

View File

@@ -6,7 +6,7 @@ from redash import models, settings
from tests import BaseTestCase, authenticated_user
class AuthenticationTestMixin(object):
class AuthenticationTestMixin:
def test_returns_404_when_not_unauthenticated(self):
for path in self.paths:
rv = self.client.get(path)