Skip to content

Commit

Permalink
Fix imports using isort
Browse files Browse the repository at this point in the history
  • Loading branch information
JonatanMartens committed Oct 15, 2021
1 parent dd7b63f commit 969663e
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 11 deletions.
7 changes: 6 additions & 1 deletion examples/client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
from pyzeebe import ZeebeClient, create_camunda_cloud_channel, create_insecure_channel, create_secure_channel
from pyzeebe import (
ZeebeClient,
create_camunda_cloud_channel,
create_insecure_channel,
create_secure_channel,
)

# Create a zeebe client without credentials
grpc_channel = create_insecure_channel(hostname="localhost", port=26500)
Expand Down
8 changes: 7 additions & 1 deletion examples/worker.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import asyncio
from typing import Dict

from pyzeebe import Job, ZeebeWorker, create_camunda_cloud_channel, create_insecure_channel, create_secure_channel
from pyzeebe import (
Job,
ZeebeWorker,
create_camunda_cloud_channel,
create_insecure_channel,
create_secure_channel,
)
from pyzeebe.errors import BusinessError


Expand Down
5 changes: 4 additions & 1 deletion pyzeebe/channel/camunda_cloud_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
from requests_oauthlib import OAuth2Session

from pyzeebe.channel.channel_options import get_channel_options
from pyzeebe.errors import InvalidCamundaCloudCredentialsError, InvalidOAuthCredentialsError
from pyzeebe.errors import (
InvalidCamundaCloudCredentialsError,
InvalidOAuthCredentialsError,
)


def create_camunda_cloud_channel(
Expand Down
6 changes: 5 additions & 1 deletion pyzeebe/grpc_internals/zeebe_adapter_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
import grpc
from zeebe_grpc.gateway_pb2_grpc import GatewayStub

from pyzeebe.errors import ZeebeBackPressureError, ZeebeGatewayUnavailableError, ZeebeInternalError
from pyzeebe.errors import (
ZeebeBackPressureError,
ZeebeGatewayUnavailableError,
ZeebeInternalError,
)

logger = logging.getLogger(__name__)

Expand Down
6 changes: 5 additions & 1 deletion pyzeebe/grpc_internals/zeebe_job_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
ThrowErrorResponse,
)

from pyzeebe.errors import ActivateJobsRequestInvalidError, JobAlreadyDeactivatedError, JobNotFoundError
from pyzeebe.errors import (
ActivateJobsRequestInvalidError,
JobAlreadyDeactivatedError,
JobNotFoundError,
)
from pyzeebe.grpc_internals.zeebe_adapter_base import ZeebeAdapterBase
from pyzeebe.job.job import Job

Expand Down
7 changes: 6 additions & 1 deletion pyzeebe/worker/task_router.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import logging
from typing import Callable, List, Optional, Tuple

from pyzeebe.errors import BusinessError, DuplicateTaskTypeError, NoVariableNameGivenError, TaskNotFoundError
from pyzeebe.errors import (
BusinessError,
DuplicateTaskTypeError,
NoVariableNameGivenError,
TaskNotFoundError,
)
from pyzeebe.function_tools import parameter_tools
from pyzeebe.job.job import Job
from pyzeebe.task import task_builder
Expand Down
5 changes: 4 additions & 1 deletion tests/unit/channel/camunda_cloud_channel_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
from requests import HTTPError

from pyzeebe import create_camunda_cloud_channel
from pyzeebe.errors import InvalidCamundaCloudCredentialsError, InvalidOAuthCredentialsError
from pyzeebe.errors import (
InvalidCamundaCloudCredentialsError,
InvalidOAuthCredentialsError,
)


@pytest.fixture
Expand Down
6 changes: 5 additions & 1 deletion tests/unit/grpc_internals/zeebe_adapter_base_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
import pytest
from mock import AsyncMock

from pyzeebe.errors import ZeebeBackPressureError, ZeebeGatewayUnavailableError, ZeebeInternalError
from pyzeebe.errors import (
ZeebeBackPressureError,
ZeebeGatewayUnavailableError,
ZeebeInternalError,
)
from pyzeebe.grpc_internals.zeebe_adapter_base import ZeebeAdapterBase


Expand Down
14 changes: 11 additions & 3 deletions tests/unit/grpc_internals/zeebe_job_adapter_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@
from uuid import uuid4

import pytest
from zeebe_grpc.gateway_pb2 import CompleteJobResponse, FailJobResponse, ThrowErrorResponse

from pyzeebe.errors import ActivateJobsRequestInvalidError, JobAlreadyDeactivatedError, JobNotFoundError
from zeebe_grpc.gateway_pb2 import (
CompleteJobResponse,
FailJobResponse,
ThrowErrorResponse,
)

from pyzeebe.errors import (
ActivateJobsRequestInvalidError,
JobAlreadyDeactivatedError,
JobNotFoundError,
)
from pyzeebe.grpc_internals.zeebe_job_adapter import ZeebeJobAdapter
from pyzeebe.job.job import Job
from pyzeebe.task.task import Task
Expand Down

0 comments on commit 969663e

Please sign in to comment.