Skip to content

Commit 3a38301

Browse files
committed
removed redundant object inheritance
1 parent 399ff39 commit 3a38301

10 files changed

Lines changed: 18 additions & 18 deletions

src/pytest_cases/case_funcs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
CASE_FIELD = '_pytestcase'
2828

2929

30-
class _CaseInfo(object):
30+
class _CaseInfo:
3131
"""
3232
Contains all information available about a case.
3333
It is attached to a case function as an attribute.

src/pytest_cases/case_parametrizer_new.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ def get_parametrize_args(host_class_or_module, # type: Union[Type, ModuleType
343343
debug)]
344344

345345

346-
class CaseParamValue(object):
346+
class CaseParamValue:
347347
"""Common class for lazy values and fixture refs created from cases"""
348348
__slots__ = ()
349349

@@ -1287,7 +1287,7 @@ def get_current_case_id(request_or_item,
12871287
# __module__ = "pytest_cases"
12881288
#
12891289
#
1290-
# class CasesModule(object):
1290+
# class CasesModule:
12911291
# """
12921292
# A collector for test cases
12931293
# This is a very lightweight version of `_pytest.python.Module`,the pytest collector for test functions and classes.

src/pytest_cases/common_others.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ class ExceptionCheckingError(AssertionError):
161161
pass
162162

163163

164-
class AssertException(object):
164+
class AssertException:
165165
""" An implementation of the `assert_exception` context manager"""
166166

167167
__slots__ = ('expected_exception', 'err_type', 'err_ptrn', 'err_inst', 'err_checker')

src/pytest_cases/common_pytest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -693,14 +693,14 @@ def getfuncargnames(function, cls=None):
693693
return arg_names
694694

695695

696-
class FakeSession(object):
696+
class FakeSession:
697697
__slots__ = ('_fixturemanager',)
698698

699699
def __init__(self):
700700
self._fixturemanager = None
701701

702702

703-
class MiniFuncDef(object):
703+
class MiniFuncDef:
704704
__slots__ = ('nodeid', 'session')
705705

706706
def __init__(self, nodeid):
@@ -910,7 +910,7 @@ def inject_host(apply_decorator):
910910
:param apply_decorator:
911911
:return:
912912
"""
913-
# class _apply_decorator_with_host_tracking(object):
913+
# class _apply_decorator_with_host_tracking:
914914
# def __init__(self, _target):
915915
# # This is called when the decorator is applied on the target. Remember the target and result of paramz
916916
# self._target = _target

src/pytest_cases/common_pytest_lazy_values.py

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

1818

19-
class Lazy(object):
19+
class Lazy:
2020
"""
2121
All lazy items should inherit from this for good pytest compliance (ids, marks, etc.)
2222
"""

src/pytest_cases/filters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from .case_funcs import get_case_id, get_case_tags
88

99

10-
class CaseFilter(object):
10+
class CaseFilter:
1111
"""
1212
This class represents a case filter. You can use it in order to filter cases to be used by `parametrize_by_cases`.
1313

src/pytest_cases/fixture_core1_unions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def __repr__(self):
4141
"""Object representing a fixture value when the fixture is used"""
4242

4343

44-
class UnionIdMakers(object):
44+
class UnionIdMakers:
4545
"""
4646
The enum defining all possible id styles for union fixture parameters ("alternatives")
4747
"""
@@ -89,7 +89,7 @@ def get(cls, style # type: Union[str, Callable]
8989
return style
9090

9191

92-
class UnionFixtureAlternative(object):
92+
class UnionFixtureAlternative:
9393
"""Defines an "alternative", used to parametrize a fixture union"""
9494
__slots__ = 'union_name', 'alternative_name', 'alternative_index'
9595

src/pytest_cases/fixture_core2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ def fixture(scope="function", # type: str
321321
hook=hook, _caller_module_offset_when_unpack=3, **kwargs)
322322

323323

324-
class FixtureParam(object):
324+
class FixtureParam:
325325
__slots__ = 'argnames',
326326

327327
def __init__(self, argnames):
@@ -331,7 +331,7 @@ def __repr__(self):
331331
return "FixtureParam(argnames=%s)" % self.argnames
332332

333333

334-
class CombinedFixtureParamValue(object):
334+
class CombinedFixtureParamValue:
335335
"""Represents a parameter value created when @parametrize is used on a @fixture """
336336
__slots__ = 'param_defs', 'argvalues',
337337

src/pytest_cases/fixture_parametrize_plus.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def _new_fixture(request, **all_fixtures):
120120
"""A readable alias for callers not using the returned symbol"""
121121

122122

123-
class fixture_ref(object): # noqa
123+
class fixture_ref: # noqa
124124
"""
125125
A reference to a fixture, to be used in `@parametrize`.
126126
You can create it from a fixture name or a fixture object (function).
@@ -178,7 +178,7 @@ def __getitem__(self, item):
178178
return FixtureRefItem(self, item)
179179

180180

181-
class FixtureRefItem(object):
181+
class FixtureRefItem:
182182
"""An item in a fixture_ref when this fixture_ref is used as a tuple."""
183183
__slots__ = 'host', 'item'
184184

src/pytest_cases/plugin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def pytest_collection(session):
7171
session._fixturemanager.getfixtureclosure = partial(getfixtureclosure, session._fixturemanager) # noqa
7272

7373

74-
class FixtureDefsCache(object):
74+
class FixtureDefsCache:
7575
"""
7676
A 'cache' for fixture definitions obtained from the FixtureManager `fm`, for test node `nodeid`
7777
"""
@@ -97,7 +97,7 @@ def get_fixture_defs(self, fixname):
9797
return fixdefs
9898

9999

100-
class FixtureClosureNode(object):
100+
class FixtureClosureNode:
101101
"""
102102
A node in a fixture closure Tree.
103103
@@ -936,7 +936,7 @@ def parametrize(metafunc, argnames, argvalues, indirect=False, ids=None, scope=N
936936
calls_reactor.append(NormalParamz(argnames, argvalues, indirect, ids, scope, kwargs))
937937

938938

939-
class CallsReactor(object):
939+
class CallsReactor:
940940
"""
941941
This object replaces the list of calls that was in `metafunc._calls`.
942942
It behaves like a list, but it actually builds that list dynamically based on all parametrizations collected

0 commit comments

Comments
 (0)