Skip to content

Commit

Permalink
state_machine.py lang.py loaders.py
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed Nov 27, 2024
1 parent 6b31928 commit 734e37f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/plumpy/base/state_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand All @@ -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__(
Expand Down
2 changes: 1 addition & 1 deletion src/plumpy/lang.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down
4 changes: 2 additions & 2 deletions src/plumpy/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion test/test_port.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit 734e37f

Please sign in to comment.