refactor: replace type with isinstance
This commit is contained in:
parent
efd0e0914e
commit
34b407f983
|
@ -153,7 +153,7 @@ def get_scope_node(node: nodes.Node, scope: Scope) -> Optional[nodes.Node]:
|
||||||
def getfixturemarker(obj: object) -> Optional["FixtureFunctionMarker"]:
|
def getfixturemarker(obj: object) -> Optional["FixtureFunctionMarker"]:
|
||||||
"""Return fixturemarker or None if it doesn't exist or raised
|
"""Return fixturemarker or None if it doesn't exist or raised
|
||||||
exceptions."""
|
exceptions."""
|
||||||
if type(obj) is FixtureFunctionDefinition:
|
if isinstance(obj, FixtureFunctionDefinition):
|
||||||
return obj._fixture_function_marker
|
return obj._fixture_function_marker
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue