Skip to content

Commit edaf2a1

Browse files
committed
Remove some old unnecessary explicit object superclasses.
1 parent dfd41e8 commit edaf2a1

11 files changed

+19
-19
lines changed

docs/validate.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ existing `TypeChecker` or create a new one. You may then create a new
8888

8989
from jsonschema import validators
9090

91-
class MyInteger(object):
91+
class MyInteger:
9292
pass
9393

9494
def is_my_int(checker, instance):

jsonschema/_format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
]
1717

1818

19-
class FormatChecker(object):
19+
class FormatChecker:
2020
"""
2121
A ``format`` property checker.
2222

jsonschema/_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def is_any(checker, instance):
6767

6868

6969
@attr.s(frozen=True)
70-
class TypeChecker(object):
70+
class TypeChecker:
7171
"""
7272
A ``type`` property checker.
7373

jsonschema/_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __repr__(self):
4343
return repr(self.store)
4444

4545

46-
class Unset(object):
46+
class Unset:
4747
"""
4848
An as-of-yet unset attribute or unprovided default parameter.
4949
"""

jsonschema/cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class _CannotLoadFile(Exception):
3030

3131

3232
@attr.s
33-
class _Outputter(object):
33+
class _Outputter:
3434

3535
_formatter = attr.ib()
3636
_stdout = attr.ib()
@@ -72,7 +72,7 @@ def validation_success(self, **kwargs):
7272

7373

7474
@attr.s
75-
class _PrettyFormatter(object):
75+
class _PrettyFormatter:
7676

7777
_ERROR_MSG = dedent(
7878
"""\
@@ -114,7 +114,7 @@ def validation_success(self, instance_path):
114114

115115

116116
@attr.s
117-
class _PlainFormatter(object):
117+
class _PlainFormatter:
118118

119119
_error_format = attr.ib()
120120

jsonschema/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def __str__(self):
237237
return self.message
238238

239239

240-
class ErrorTree(object):
240+
class ErrorTree:
241241
"""
242242
ErrorTrees make it easier to check which validations failed.
243243
"""

jsonschema/tests/_suite.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def _find_suite():
3636

3737

3838
@attr.s(hash=True)
39-
class Suite(object):
39+
class Suite:
4040

4141
_root = attr.ib(default=attr.Factory(_find_suite))
4242

@@ -63,7 +63,7 @@ def version(self, name):
6363

6464

6565
@attr.s(hash=True)
66-
class Version(object):
66+
class Version:
6767

6868
_path = attr.ib()
6969
_remotes = attr.ib()
@@ -140,7 +140,7 @@ def _tests_in(self, subject, path):
140140

141141

142142
@attr.s(hash=True, repr=False)
143-
class _Test(object):
143+
class _Test:
144144

145145
version = attr.ib()
146146

jsonschema/tests/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
def fake_validator(*errors):
3030
errors = list(reversed(errors))
3131

32-
class FakeValidator(object):
32+
class FakeValidator:
3333
def __init__(self, *args, **kwargs):
3434
pass
3535

jsonschema/tests/test_exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ def test_str_works_with_instances_having_overriden_eq_operator(self):
563563
that returned truthy values.
564564
"""
565565

566-
class DontEQMeBro(object):
566+
class DontEQMeBro:
567567
def __eq__(this, other): # pragma: no cover
568568
self.fail("Don't!")
569569

jsonschema/tests/test_validators.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,7 +1406,7 @@ def test_ref_sibling(self):
14061406
)
14071407

14081408

1409-
class MetaSchemaTestsMixin(object):
1409+
class MetaSchemaTestsMixin:
14101410
# TODO: These all belong upstream
14111411
def test_invalid_properties(self):
14121412
with self.assertRaises(exceptions.SchemaError):
@@ -1504,7 +1504,7 @@ def test_it_delegates_to_a_legacy_ref_resolver(self):
15041504
resolution.
15051505
"""
15061506

1507-
class LegacyRefResolver(object):
1507+
class LegacyRefResolver:
15081508
@contextmanager
15091509
def resolving(this, ref):
15101510
self.assertEqual(ref, "the ref")
@@ -1677,7 +1677,7 @@ def test_check_redefined_sequence(self):
16771677
validator.validate(instance)
16781678

16791679

1680-
class AntiDraft6LeakMixin(object):
1680+
class AntiDraft6LeakMixin:
16811681
"""
16821682
Make sure functionality from draft 6 doesn't leak backwards in time.
16831683
"""
@@ -2202,7 +2202,7 @@ def key(error):
22022202

22032203

22042204
@attr.s
2205-
class ReallyFakeRequests(object):
2205+
class ReallyFakeRequests:
22062206

22072207
_responses = attr.ib()
22082208

@@ -2214,7 +2214,7 @@ def get(self, url):
22142214

22152215

22162216
@attr.s
2217-
class _ReallyFakeJSONResponse(object):
2217+
class _ReallyFakeJSONResponse:
22182218

22192219
_response = attr.ib()
22202220

jsonschema/validators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ def extend(
662662
_LATEST_VERSION = Draft202012Validator
663663

664664

665-
class RefResolver(object):
665+
class RefResolver:
666666
"""
667667
Resolve JSON References.
668668

0 commit comments

Comments
 (0)