Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds ruff as a drop in replacement for black #91

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# isort: skip_file
.venv
__pycache__
2 changes: 0 additions & 2 deletions gevent_async/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ async def async_main():
# running this async main. The max_workers here needs to have enough room to
# support the max concurrent activities/workflows settings.
with GeventExecutor(max_workers=200) as executor:

# Run a worker for the workflow and activities
async with Worker(
client,
Expand All @@ -65,7 +64,6 @@ async def async_main():
max_concurrent_activities=100,
max_concurrent_workflow_tasks=100,
):

# Wait until interrupted
logging.info("Worker started, ctrl+c to exit")
await interrupt_event.wait()
Expand Down
1 change: 0 additions & 1 deletion hello/hello_activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ async def main():
workflows=[GreetingWorkflow],
activities=[compose_greeting],
):

# While the worker is running, use the client to run the workflow and
# print out its result. Note, in many production setups, the client
# would be in a completely separate process from the worker.
Expand Down
1 change: 0 additions & 1 deletion hello/hello_activity_choice.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ async def main():
workflows=[PurchaseFruitsWorkflow],
activities=[order_apples, order_bananas, order_cherries, order_oranges],
):

# While the worker is running, use the client to run the workflow and
# print out its result. Note, in many production setups, the client
# would be in a completely separate process from the worker.
Expand Down
1 change: 0 additions & 1 deletion hello/hello_activity_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ async def main():
workflows=[MyWorkflow],
activities=[my_activities.do_database_thing],
):

# While the worker is running, use the client to run the workflow and
# print out its result. Note, in many production setups, the client
# would be in a completely separate process from the worker.
Expand Down
1 change: 0 additions & 1 deletion hello/hello_activity_multiprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ async def main():
multiprocessing.Manager()
),
):

# While the worker is running, use the client to run the workflow and
# print out its result. Note, in many production setups, the client
# would be in a completely separate process from the worker.
Expand Down
1 change: 0 additions & 1 deletion hello/hello_activity_retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ async def main():
workflows=[GreetingWorkflow],
activities=[compose_greeting],
):

# While the worker is running, use the client to run the workflow and
# print out its result. Note, in many production setups, the client
# would be in a completely separate process from the worker.
Expand Down
1 change: 0 additions & 1 deletion hello/hello_activity_threaded.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ async def main():
# desired.
activity_executor=ThreadPoolExecutor(5),
):

# While the worker is running, use the client to run the workflow and
# print out its result. Note, in many production setups, the client
# would be in a completely separate process from the worker.
Expand Down
1 change: 0 additions & 1 deletion hello/hello_async_activity_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ async def main():
workflows=[GreetingWorkflow],
activities=[composer.compose_greeting],
):

# While the worker is running, use the client to run the workflow and
# print out its result. Note, in many production setups, the client
# would be in a completely separate process from the worker.
Expand Down
1 change: 0 additions & 1 deletion hello/hello_cancellation.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ async def main():
workflows=[CancellationWorkflow],
activities=[never_complete_activity, cleanup_activity],
):

# While the worker is running, use the client to start the workflow.
# Note, in many production setups, the client would be in a completely
# separate process from the worker.
Expand Down
1 change: 0 additions & 1 deletion hello/hello_child_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ async def main():
task_queue="hello-child-workflow-task-queue",
workflows=[GreetingWorkflow, ComposeGreetingWorkflow],
):

# While the worker is running, use the client to run the workflow and
# print out its result. Note, in many production setups, the client
# would be in a completely separate process from the worker.
Expand Down
1 change: 0 additions & 1 deletion hello/hello_continue_as_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ async def main():
task_queue="hello-continue-as-new-task-queue",
workflows=[LoopingWorkflow],
):

# While the worker is running, use the client to run the workflow. Note,
# in many production setups, the client would be in a completely
# separate process from the worker.
Expand Down
1 change: 0 additions & 1 deletion hello/hello_cron.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ async def main():
workflows=[GreetingWorkflow],
activities=[compose_greeting],
):

print("Running workflow once a minute")

# While the worker is running, use the client to start the workflow.
Expand Down
1 change: 0 additions & 1 deletion hello/hello_exception.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ async def main():
workflows=[GreetingWorkflow],
activities=[compose_greeting],
):

# While the worker is running, use the client to run the workflow and
# print out its result. Note, in many production setups, the client
# would be in a completely separate process from the worker.
Expand Down
1 change: 0 additions & 1 deletion hello/hello_local_activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ async def main():
workflows=[GreetingWorkflow],
activities=[compose_greeting],
):

# While the worker is running, use the client to run the workflow and
# print out its result. Note, in many production setups, the client
# would be in a completely separate process from the worker.
Expand Down
1 change: 0 additions & 1 deletion hello/hello_mtls.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ async def main():
workflows=[GreetingWorkflow],
activities=[compose_greeting],
):

# While the worker is running, use the client to run the workflow and
# print out its result. Note, in many production setups, the client
# would be in a completely separate process from the worker.
Expand Down
1 change: 0 additions & 1 deletion hello/hello_parallel_activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ async def main():
workflows=[SayHelloWorkflow],
activities=[say_hello_activity],
):

# While the worker is running, use the client to run the workflow and
# print out its result. Note, in many production setups, the client
# would be in a completely separate process from the worker.
Expand Down
1 change: 0 additions & 1 deletion hello/hello_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ async def main():
task_queue="hello-query-task-queue",
workflows=[GreetingWorkflow],
):

# While the worker is running, use the client to start the workflow.
# Note, in many production setups, the client would be in a completely
# separate process from the worker.
Expand Down
1 change: 0 additions & 1 deletion hello/hello_search_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ async def main():
task_queue="hello-search-attributes-task-queue",
workflows=[GreetingWorkflow],
):

# While the worker is running, use the client to start the workflow.
# Note, in many production setups, the client would be in a completely
# separate process from the worker.
Expand Down
1 change: 0 additions & 1 deletion hello/hello_signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ async def main():
task_queue="hello-signal-task-queue",
workflows=[GreetingWorkflow],
):

# While the worker is running, use the client to start the workflow.
# Note, in many production setups, the client would be in a completely
# separate process from the worker.
Expand Down
Loading
Loading