Skip to content

Commit

Permalink
No more explicit object inheritance
Browse files Browse the repository at this point in the history
  • Loading branch information
bitprophet committed Feb 16, 2023
1 parent cd84a78 commit 4e3d82f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def expect(
return stdout, stderr


class MockSubprocess(object):
class MockSubprocess:
def __init__(self, out="", err="", exit=0, isatty=None, autostart=True):
self.out_file = BytesIO(out.encode())
self.err_file = BytesIO(err.encode())
Expand Down
4 changes: 2 additions & 2 deletions tests/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def prefers_task_name_attr_over_function_name(self):

def raises_ValueError_if_no_name_found(self):
# Can't use a lambda here as they are technically real functions.
class Callable(object):
class Callable:
def __call__(self, ctx):
pass

Expand Down Expand Up @@ -560,7 +560,7 @@ def transforms_are_applied_to_explicit_module_namespaces(self):
# from_module() with explicit 'ns' objects!)
namespace = self._nested_underscores()

class FakeModule(object):
class FakeModule:
__name__ = "my_module"
ns = namespace

Expand Down
4 changes: 2 additions & 2 deletions tests/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ def numeric_types_become_casted(self):
def arbitrary_types_work_too(self):
os.environ["INVOKE_FOO"] = "whatever"

class Meh(object):
class Meh:
def __init__(self, thing=None):
pass

Expand Down Expand Up @@ -1047,7 +1047,7 @@ def raises_TypeError_if_value_is_not_Config_subclass(self):
else:
assert False, "Non-class obj did not raise TypeError!"

class Foo(object):
class Foo:
pass

try:
Expand Down
2 changes: 1 addition & 1 deletion tests/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ class Oops(Exception):

@patch(local_path)
def cd_should_accept_any_stringable_object(self, Local):
class Path(object):
class Path:
def __init__(self, value):
self.value = value

Expand Down
4 changes: 2 additions & 2 deletions tests/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def foo(c):
def is_None_if_docstring_matches_object_type(self):
# I.e. we don't want a docstring that is coming from the class
# instead of the instance.
class Foo(object):
class Foo:
"I am Foo"
pass

Expand All @@ -56,7 +56,7 @@ class Foo(object):
def instance_attached_docstring_is_still_displayed(self):
# This is actually a property of regular object semantics, but
# whatever, why not have a test for it.
class Foo(object):
class Foo:
"I am Foo"
pass

Expand Down

0 comments on commit 4e3d82f

Please sign in to comment.