diff --git a/src/plumpy/base/state_machine.py b/src/plumpy/base/state_machine.py index 4e7a5722..62062d5d 100644 --- a/src/plumpy/base/state_machine.py +++ b/src/plumpy/base/state_machine.py @@ -26,7 +26,7 @@ class StateMachineError(Exception): """Base class for state machine errors""" -class StateEntryFailed(Exception): +class StateEntryFailed(Exception): # noqa: N818 """ Failed to enter a state, can provide the next state to go to via this exception """ @@ -48,7 +48,7 @@ def __init__(self, evt: str, msg: str): self.event = evt -class TransitionFailed(Exception): +class TransitionFailed(Exception): # noqa: N818 """A state transition failed""" def __init__( diff --git a/src/plumpy/lang.py b/src/plumpy/lang.py index 9672d500..aad2abb6 100644 --- a/src/plumpy/lang.py +++ b/src/plumpy/lang.py @@ -67,7 +67,7 @@ def wrapped_fn(self: Any, *args: Any, **kwargs: Any) -> Callable[..., Any]: return wrap -class __NULL: # pylint: disable=invalid-name +class __NULL: # noqa: N801 def __eq__(self, other: Any) -> bool: return isinstance(other, self.__class__) diff --git a/src/plumpy/loaders.py b/src/plumpy/loaders.py index 59f33f64..2da2e57c 100644 --- a/src/plumpy/loaders.py +++ b/src/plumpy/loaders.py @@ -74,7 +74,7 @@ def get_object_loader() -> ObjectLoader: :return: A class loader :rtype: :class:`ObjectLoader` """ - global OBJECT_LOADER + global OBJECT_LOADER # noqa: PLW0603 if OBJECT_LOADER is None: OBJECT_LOADER = DefaultObjectLoader() return OBJECT_LOADER @@ -88,5 +88,5 @@ def set_object_loader(loader: Optional[ObjectLoader]) -> None: :type loader: :class:`ObjectLoader` :return: """ - global OBJECT_LOADER + global OBJECT_LOADER # noqa: PLW0603 OBJECT_LOADER = loader diff --git a/test/test_port.py b/test/test_port.py index b0535fdb..da483e81 100644 --- a/test/test_port.py +++ b/test/test_port.py @@ -80,7 +80,7 @@ def test_lambda_default(self): port = InputPort('test', valid_type=(types.FunctionType, int), default=lambda: 5) def some_lambda(): - "string" + return 'string' self.assertIsNone(port.validate(some_lambda))