Skip to content

Commit

Permalink
fix: Apply the new isort rule by ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
achimnol committed Sep 8, 2023
1 parent 0b54c62 commit 359ec03
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 22 deletions.
4 changes: 2 additions & 2 deletions examples/ordering-by-exit-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
import json
import signal

from callosum.rpc import Peer
from callosum.lower.zeromq import ZeroMQAddress, ZeroMQRPCTransport
from callosum.ordering import (
ExitOrderedAsyncScheduler,
)
from callosum.lower.zeromq import ZeroMQAddress, ZeroMQRPCTransport
from callosum.rpc import Peer


async def handle_echo(request):
Expand Down
4 changes: 2 additions & 2 deletions examples/ordering-by-key-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
import json
import signal

from callosum.rpc import Peer
from callosum.lower.zeromq import ZeroMQAddress, ZeroMQRPCTransport
from callosum.ordering import (
KeySerializedAsyncScheduler,
)
from callosum.lower.zeromq import ZeroMQAddress, ZeroMQRPCTransport
from callosum.rpc import Peer


async def handle_echo(request):
Expand Down
2 changes: 1 addition & 1 deletion examples/ordering-client.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import asyncio
import json

from callosum.rpc import Peer
from callosum.lower.zeromq import ZeroMQAddress, ZeroMQRPCTransport
from callosum.rpc import Peer


async def call() -> None:
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-client-redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import random
import secrets

from callosum.rpc import Peer
from callosum.lower.rpc_redis import (
RedisStreamAddress,
RPCRedisTransport,
)
from callosum.rpc import Peer


async def call():
Expand Down
1 change: 1 addition & 0 deletions examples/simple-client-thrift.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import textwrap

import thriftpy2 as thriftpy

from callosum.lower.zeromq import ZeroMQAddress, ZeroMQRPCTransport
from callosum.rpc import Peer, RPCUserError
from callosum.serialize import noop_deserializer, noop_serializer
Expand Down
8 changes: 4 additions & 4 deletions examples/simple-consumer-redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
import os
import signal

from callosum.pubsub import (
Consumer,
)
from callosum.lower.dispatch_redis import (
RedisStreamAddress,
DispatchRedisTransport,
RedisStreamAddress,
)
from callosum.pubsub import (
Consumer,
)


Expand Down
8 changes: 4 additions & 4 deletions examples/simple-publisher-redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
import random
import secrets

from callosum.pubsub import (
Publisher,
)
from callosum.lower.dispatch_redis import (
RedisStreamAddress,
DispatchRedisTransport,
RedisStreamAddress,
)
from callosum.pubsub import (
Publisher,
)


Expand Down
2 changes: 1 addition & 1 deletion examples/simple-server-redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import signal
import time

from callosum.rpc import Peer
from callosum.lower.rpc_redis import (
RedisStreamAddress,
RPCRedisTransport,
)
from callosum.rpc import Peer


async def handle_echo(request):
Expand Down
8 changes: 4 additions & 4 deletions examples/simple-server-thrift.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
import pathlib
import signal

from callosum.rpc import Peer
from callosum.serialize import noop_serializer, noop_deserializer
from callosum.lower.zeromq import ZeroMQAddress, ZeroMQRPCTransport
from callosum.upper.thrift import ThriftServerAdaptor
import thriftpy2 as thriftpy

from callosum.lower.zeromq import ZeroMQAddress, ZeroMQRPCTransport
from callosum.rpc import Peer
from callosum.serialize import noop_deserializer, noop_serializer
from callosum.upper.thrift import ThriftServerAdaptor

simple_thrift = thriftpy.load(
str(pathlib.Path(__file__).parent / "simple.thrift"), module_name="simple_thrift"
Expand Down
6 changes: 3 additions & 3 deletions examples/simple-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
from typing import Mapping, Type

import click
from callosum.rpc import Peer

from callosum.lower.zeromq import ZeroMQAddress, ZeroMQRPCTransport
from callosum.ordering import (
AbstractAsyncScheduler,
ExitOrderedAsyncScheduler,
KeySerializedAsyncScheduler,
)
from callosum.lower.zeromq import ZeroMQAddress, ZeroMQRPCTransport

from callosum.rpc import Peer

scheduler_types: Mapping[str, Type[AbstractAsyncScheduler]] = {
"key-serialized": KeySerializedAsyncScheduler,
Expand Down

0 comments on commit 359ec03

Please sign in to comment.