Skip to content

Commit

Permalink
run precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
Lancetnik committed Nov 29, 2024
1 parent f6cd4ba commit 5194662
Show file tree
Hide file tree
Showing 45 changed files with 186 additions and 186 deletions.
22 changes: 11 additions & 11 deletions faststream/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@
from faststream.utils import Context, Depends, Header, Path, apply_types, context

__all__ = (
# middlewares
"BaseMiddleware",
"Context",
"ContextRepo",
"Depends",
"ExceptionMiddleware",
# app
"FastStream",
"TestApp",
# utils
"apply_types",
"context",
"Context",
"Header",
"Path",
"Depends",
# annotations
"Logger",
"ContextRepo",
"NoCast",
# middlewares
"BaseMiddleware",
"ExceptionMiddleware",
"Path",
# basic
"Response",
"TestApp",
# utils
"apply_types",
"context",
)
4 changes: 2 additions & 2 deletions faststream/asgi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

__all__ = (
"AsgiFastStream",
"make_ping_asgi",
"make_asyncapi_asgi",
"AsgiResponse",
"get",
"make_asyncapi_asgi",
"make_ping_asgi",
)
2 changes: 1 addition & 1 deletion faststream/asyncapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
from faststream.asyncapi.site import get_asyncapi_html

__all__ = (
"get_asyncapi_html",
"get_app_schema",
"get_asyncapi_html",
)
38 changes: 19 additions & 19 deletions faststream/asyncapi/schema/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,33 +29,33 @@
__all__ = (
# main
"ASYNC_API_VERSION",
"Schema",
# channels
"Channel",
"ChannelBinding",
"Components",
# info
"Info",
"Contact",
"ContactDict",
"CorrelationId",
"ExternalDocs",
"ExternalDocsDict",
# info
"Info",
"License",
"LicenseDict",
# messages
"Message",
# subscription
"Operation",
"OperationBinding",
"Reference",
"Schema",
# security
"SecuritySchemaComponent",
# servers
"Server",
# channels
"Channel",
# bindings
"ServerBinding",
# utils
"Tag",
"TagDict",
"ExternalDocs",
"ExternalDocsDict",
"Reference",
# bindings
"ServerBinding",
"ChannelBinding",
"OperationBinding",
# messages
"Message",
"CorrelationId",
# security
"SecuritySchemaComponent",
# subscription
"Operation",
)
4 changes: 2 additions & 2 deletions faststream/broker/fastapi/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
)

__all__ = (
"RequestValidationError",
"create_response_field",
"solve_faststream_dependency",
"raise_fastapi_validation_error",
"RequestValidationError",
"solve_faststream_dependency",
)


Expand Down
6 changes: 3 additions & 3 deletions faststream/broker/subscriber/call_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ class HandlerItem(SetupAble, Generic[MsgType]):
"""A class representing handler overloaded item."""

__slots__ = (
"handler",
"filter",
"dependant",
"dependencies",
"item_parser",
"filter",
"handler",
"item_decoder",
"item_middlewares",
"item_parser",
)

dependant: Optional[Any]
Expand Down
6 changes: 3 additions & 3 deletions faststream/broker/subscriber/usecase.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@

class _CallOptions:
__slots__ = (
"filter",
"parser",
"decoder",
"middlewares",
"dependencies",
"filter",
"middlewares",
"parser",
)

def __init__(
Expand Down
8 changes: 4 additions & 4 deletions faststream/broker/wrapper/call.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ class HandlerCallWrapper(Generic[MsgType, P_HandlerParams, T_HandlerReturn]):
_publishers: List["PublisherProto[MsgType]"]

__slots__ = (
"mock",
"future",
"is_test",
"_wrapped_call",
"_original_call",
"_publishers",
"_wrapped_call",
"future",
"is_test",
"mock",
)

def __new__(
Expand Down
8 changes: 4 additions & 4 deletions faststream/confluent/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
__all__ = (
"KafkaBroker",
"KafkaMessage",
"KafkaRouter",
"KafkaRoute",
"KafkaPublisher",
"KafkaResponse",
"TopicPartition",
"TestKafkaBroker",
"KafkaRoute",
"KafkaRouter",
"TestApp",
"TestKafkaBroker",
"TopicPartition",
)
6 changes: 3 additions & 3 deletions faststream/confluent/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
from faststream.utils.context import Context

__all__ = (
"Logger",
"ContextRepo",
"NoCast",
"KafkaMessage",
"KafkaBroker",
"KafkaMessage",
"KafkaProducer",
"Logger",
"NoCast",
)

KafkaMessage = Annotated[KM, Context("message")]
Expand Down
6 changes: 3 additions & 3 deletions faststream/confluent/fastapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

__all__ = (
"Context",
"Logger",
"ContextRepo",
"KafkaRouter",
"KafkaMessage",
"KafkaBroker",
"KafkaMessage",
"KafkaProducer",
"KafkaRouter",
"Logger",
)

KafkaMessage = Annotated[KM, Context("message")]
Expand Down
8 changes: 4 additions & 4 deletions faststream/confluent/schemas/partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ class _TopicKwargs(TypedDict):

class TopicPartition:
__slots__ = (
"topic",
"partition",
"offset",
"metadata",
"leader_epoch",
"metadata",
"offset",
"partition",
"topic",
)

def __init__(
Expand Down
8 changes: 4 additions & 4 deletions faststream/kafka/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
__all__ = (
"KafkaBroker",
"KafkaMessage",
"KafkaRouter",
"KafkaRoute",
"KafkaResponse",
"KafkaPublisher",
"TestKafkaBroker",
"KafkaResponse",
"KafkaRoute",
"KafkaRouter",
"TestApp",
"TestKafkaBroker",
"TopicPartition",
)
6 changes: 3 additions & 3 deletions faststream/kafka/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
from faststream.utils.context import Context

__all__ = (
"Logger",
"ContextRepo",
"NoCast",
"KafkaMessage",
"KafkaBroker",
"KafkaMessage",
"KafkaProducer",
"Logger",
"NoCast",
)

Consumer = Annotated[AIOKafkaConsumer, Context("handler_.consumer")]
Expand Down
6 changes: 3 additions & 3 deletions faststream/kafka/fastapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

__all__ = (
"Context",
"Logger",
"ContextRepo",
"KafkaRouter",
"KafkaMessage",
"KafkaBroker",
"KafkaMessage",
"KafkaProducer",
"KafkaRouter",
"Logger",
)

KafkaMessage = Annotated[KM, Context("message")]
Expand Down
30 changes: 15 additions & 15 deletions faststream/nats/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,29 @@
from faststream.testing.app import TestApp

__all__ = (
"TestApp",
"NatsBroker",
"JStream",
"PullSub",
"KvWatch",
"ObjWatch",
"NatsRoute",
"NatsRouter",
"NatsPublisher",
"TestNatsBroker",
"NatsMessage",
"NatsResponse",
"AckPolicy",
# Nats imports
"ConsumerConfig",
"DeliverPolicy",
"AckPolicy",
"ReplayPolicy",
"DiscardPolicy",
"RetentionPolicy",
"ExternalStream",
"JStream",
"KvWatch",
"NatsBroker",
"NatsMessage",
"NatsPublisher",
"NatsResponse",
"NatsRoute",
"NatsRouter",
"ObjWatch",
"Placement",
"PullSub",
"RePublish",
"ReplayPolicy",
"RetentionPolicy",
"StorageType",
"StreamConfig",
"StreamSource",
"TestApp",
"TestNatsBroker",
)
10 changes: 5 additions & 5 deletions faststream/nats/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
from faststream.utils.context import Context

__all__ = (
"Logger",
"ContextRepo",
"NoCast",
"NatsMessage",
"NatsBroker",
"Client",
"ContextRepo",
"JsClient",
"Logger",
"NatsBroker",
"NatsMessage",
"NoCast",
"ObjectStorage",
)

Expand Down
10 changes: 5 additions & 5 deletions faststream/nats/fastapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
NatsJsProducer = Annotated[NatsJSFastProducer, Context("broker._js_producer")]

__all__ = (
"Client",
"Context",
"Logger",
"ContextRepo",
"NatsRouter",
"JsClient",
"Logger",
"NatsBroker",
"NatsJsProducer",
"NatsMessage",
"Client",
"JsClient",
"NatsProducer",
"NatsJsProducer",
"NatsRouter",
)
2 changes: 1 addition & 1 deletion faststream/nats/helpers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

__all__ = (
"KVBucketDeclarer",
"StreamBuilder",
"OSBucketDeclarer",
"StreamBuilder",
)
2 changes: 1 addition & 1 deletion faststream/nats/schemas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

__all__ = (
"JStream",
"PullSub",
"KvWatch",
"ObjWatch",
"PullSub",
)
4 changes: 2 additions & 2 deletions faststream/nats/schemas/js_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ class JStream(NameRequired):
"""A class to represent a JetStream stream."""

__slots__ = (
"name",
"config",
"subjects",
"declare",
"name",
"subjects",
)

def __init__(
Expand Down
Loading

0 comments on commit 5194662

Please sign in to comment.