Skip to content

Commit

Permalink
style: ruff
Browse files Browse the repository at this point in the history
Signed-off-by: Yves Bastide <[email protected]>
  • Loading branch information
ybastide committed Jan 19, 2025
1 parent 995a937 commit 9080679
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion simpleflow/process/_supervisor.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def terminate(self):
Terminate all worker processes managed by this Supervisor.
"""
self._terminating = True
logger.info("process: will stop workers, this might take up several minutes. " "Please, be patient.")
logger.info("process: will stop workers, this might take up several minutes. Please, be patient.")
self._killall()

def _killall(self):
Expand Down
2 changes: 1 addition & 1 deletion simpleflow/swf/mapper/querysets/activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def domain(self, value: Domain):
from simpleflow.swf.mapper.models.domain import Domain

if not isinstance(value, Domain):
err = "domain property has to be of" f"swf.model.domain.Domain type, not {type(value)!r}"
err = f"domain property has to be of swf.model.domain.Domain type, not {type(value)!r}"
raise TypeError(err)
self._domain = value

Expand Down
2 changes: 1 addition & 1 deletion simpleflow/swf/mapper/querysets/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def domain(self) -> Domain | None:
@domain.setter
def domain(self, value: Domain):
if not isinstance(value, Domain):
err = "domain property has to be of" f"swf.model.domain.Domain type, not {type(value)!r}"
err = f"domain property has to be of swf.model.domain.Domain type, not {type(value)!r}"
raise TypeError(err)
self._domain = value

Expand Down
3 changes: 1 addition & 2 deletions simpleflow/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ def name(self):

def __repr__(self):
return (
f"{self.__class__.__name__}(activity={self.activity}, args={self.args}, kwargs={self.kwargs},"
f" id={self.id})"
f"{self.__class__.__name__}(activity={self.activity}, args={self.args}, kwargs={self.kwargs}, id={self.id})"
)

def execute(self):
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ def get_uuid(unused=None):

@activity.with_attributes(task_list="quickstart", version="example")
def increment(x):
print("increment: %d" % x)
print(f"increment: {x:d}")
return x + 1


@activity.with_attributes(task_list="quickstart", version="example")
def double(y):
print("double: %d" % y)
print(f"double: {y:d}")
return y * 2


Expand Down

0 comments on commit 9080679

Please sign in to comment.