ruff fixed formatting
This commit is contained in:
@@ -7,8 +7,10 @@ from python_repositories.interfaces.context_aware_interface import ContextAwareI
|
||||
|
||||
def test_instantiation_fails_when_enter_not_implemented() -> None:
|
||||
"""Test that instantiation fails if __enter__ is not implemented."""
|
||||
|
||||
class Incomplete(ContextAwareInterface):
|
||||
"""A class that does not implement __enter__."""
|
||||
|
||||
def __exit__(
|
||||
self, exc_type: type | None, exc_val: object | None, exc_tb: object | None
|
||||
) -> None:
|
||||
@@ -20,8 +22,10 @@ def test_instantiation_fails_when_enter_not_implemented() -> None:
|
||||
|
||||
def test_instantiation_fails_when_exit_not_implemented() -> None:
|
||||
"""Test that instantiation fails if __exit__ is not implemented."""
|
||||
|
||||
class Incomplete(ContextAwareInterface):
|
||||
"""A class that does not implement __exit__."""
|
||||
|
||||
def __enter__(self) -> Incomplete:
|
||||
return self
|
||||
|
||||
@@ -31,8 +35,10 @@ def test_instantiation_fails_when_exit_not_implemented() -> None:
|
||||
|
||||
def test_enter_raises_not_implemented_if_not_overwritten() -> None:
|
||||
"""Test that __enter__ raises NotImplementedError if not implemented."""
|
||||
|
||||
class Incomplete(ContextAwareInterface):
|
||||
"""A class that does not implement __enter__."""
|
||||
|
||||
def __enter__(self) -> Incomplete:
|
||||
super().__enter__() # type: ignore
|
||||
return self
|
||||
@@ -49,8 +55,10 @@ def test_enter_raises_not_implemented_if_not_overwritten() -> None:
|
||||
|
||||
def test_exit_raises_not_implemented_if_not_overwritten() -> None:
|
||||
"""Test that __exit__ raises NotImplementedError if not implemented."""
|
||||
|
||||
class Incomplete(ContextAwareInterface):
|
||||
"""A class that does not implement __exit__."""
|
||||
|
||||
def __enter__(self) -> ContextAwareInterface:
|
||||
return self
|
||||
|
||||
|
||||
Reference in New Issue
Block a user