summaryrefslogtreecommitdiff
path: root/jsonschema/tests
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2022-08-18 14:03:22 +0300
committerJulian Berman <Julian@GrayVines.com>2022-08-18 14:03:22 +0300
commitedaf2a19c4a4915928cfe4e5073abb0f10321c59 (patch)
treecdab28f42f36636c365c6a6ee668316f9608d705 /jsonschema/tests
parentdfd41e84c5469352f79d14f0cc4539fc7bd1d8f7 (diff)
downloadjsonschema-edaf2a19c4a4915928cfe4e5073abb0f10321c59.tar.gz
Remove some old unnecessary explicit object superclasses.
Diffstat (limited to 'jsonschema/tests')
-rw-r--r--jsonschema/tests/_suite.py6
-rw-r--r--jsonschema/tests/test_cli.py2
-rw-r--r--jsonschema/tests/test_exceptions.py2
-rw-r--r--jsonschema/tests/test_validators.py10
4 files changed, 10 insertions, 10 deletions
diff --git a/jsonschema/tests/_suite.py b/jsonschema/tests/_suite.py
index a2148ba..0ee72b7 100644
--- a/jsonschema/tests/_suite.py
+++ b/jsonschema/tests/_suite.py
@@ -36,7 +36,7 @@ def _find_suite():
@attr.s(hash=True)
-class Suite(object):
+class Suite:
_root = attr.ib(default=attr.Factory(_find_suite))
@@ -63,7 +63,7 @@ class Suite(object):
@attr.s(hash=True)
-class Version(object):
+class Version:
_path = attr.ib()
_remotes = attr.ib()
@@ -140,7 +140,7 @@ class Version(object):
@attr.s(hash=True, repr=False)
-class _Test(object):
+class _Test:
version = attr.ib()
diff --git a/jsonschema/tests/test_cli.py b/jsonschema/tests/test_cli.py
index b0e08c4..b4b59f7 100644
--- a/jsonschema/tests/test_cli.py
+++ b/jsonschema/tests/test_cli.py
@@ -29,7 +29,7 @@ from jsonschema.validators import _LATEST_VERSION, validate
def fake_validator(*errors):
errors = list(reversed(errors))
- class FakeValidator(object):
+ class FakeValidator:
def __init__(self, *args, **kwargs):
pass
diff --git a/jsonschema/tests/test_exceptions.py b/jsonschema/tests/test_exceptions.py
index 521f445..d7b9deb 100644
--- a/jsonschema/tests/test_exceptions.py
+++ b/jsonschema/tests/test_exceptions.py
@@ -563,7 +563,7 @@ class TestErrorInitReprStr(TestCase):
that returned truthy values.
"""
- class DontEQMeBro(object):
+ class DontEQMeBro:
def __eq__(this, other): # pragma: no cover
self.fail("Don't!")
diff --git a/jsonschema/tests/test_validators.py b/jsonschema/tests/test_validators.py
index e4f60ea..d49dba0 100644
--- a/jsonschema/tests/test_validators.py
+++ b/jsonschema/tests/test_validators.py
@@ -1406,7 +1406,7 @@ class TestValidationErrorDetails(TestCase):
)
-class MetaSchemaTestsMixin(object):
+class MetaSchemaTestsMixin:
# TODO: These all belong upstream
def test_invalid_properties(self):
with self.assertRaises(exceptions.SchemaError):
@@ -1504,7 +1504,7 @@ class ValidatorTestMixin(MetaSchemaTestsMixin, object):
resolution.
"""
- class LegacyRefResolver(object):
+ class LegacyRefResolver:
@contextmanager
def resolving(this, ref):
self.assertEqual(ref, "the ref")
@@ -1677,7 +1677,7 @@ class ValidatorTestMixin(MetaSchemaTestsMixin, object):
validator.validate(instance)
-class AntiDraft6LeakMixin(object):
+class AntiDraft6LeakMixin:
"""
Make sure functionality from draft 6 doesn't leak backwards in time.
"""
@@ -2202,7 +2202,7 @@ def sorted_errors(errors):
@attr.s
-class ReallyFakeRequests(object):
+class ReallyFakeRequests:
_responses = attr.ib()
@@ -2214,7 +2214,7 @@ class ReallyFakeRequests(object):
@attr.s
-class _ReallyFakeJSONResponse(object):
+class _ReallyFakeJSONResponse:
_response = attr.ib()