Skip to content

Commit

Permalink
Allow None as lock method
Browse files Browse the repository at this point in the history
  • Loading branch information
pmrv committed Oct 5, 2023
1 parent f9a0fd2 commit 7d0522b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyiron_base/interfaces/lockable.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def lock(self, method: Optional[Literal["error", "warning"]] = None):
Raises:
ValueError: if `method` is not an allowed value
"""
if method not in ["error", "warning"]:
if method not in ["error", "warning", None]:
raise ValueError(f"Unrecognized lock method {method}!")
if method is not None:
object.__setattr__(self, "_lock_method", method)
Expand Down

0 comments on commit 7d0522b

Please sign in to comment.