diff --git a/faststream/__init__.py b/faststream/__init__.py index d3e1dde09e..b4267f7895 100644 --- a/faststream/__init__.py +++ b/faststream/__init__.py @@ -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", ) diff --git a/faststream/asgi/__init__.py b/faststream/asgi/__init__.py index d9006a2207..ef994978d8 100644 --- a/faststream/asgi/__init__.py +++ b/faststream/asgi/__init__.py @@ -5,8 +5,8 @@ __all__ = ( "AsgiFastStream", - "make_ping_asgi", - "make_asyncapi_asgi", "AsgiResponse", "get", + "make_asyncapi_asgi", + "make_ping_asgi", ) diff --git a/faststream/asyncapi/__init__.py b/faststream/asyncapi/__init__.py index 07827b8101..be11a98029 100644 --- a/faststream/asyncapi/__init__.py +++ b/faststream/asyncapi/__init__.py @@ -4,6 +4,6 @@ from faststream.asyncapi.site import get_asyncapi_html __all__ = ( - "get_asyncapi_html", "get_app_schema", + "get_asyncapi_html", ) diff --git a/faststream/asyncapi/schema/__init__.py b/faststream/asyncapi/schema/__init__.py index e6881e1873..b9d626e5c6 100644 --- a/faststream/asyncapi/schema/__init__.py +++ b/faststream/asyncapi/schema/__init__.py @@ -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", ) diff --git a/faststream/broker/fastapi/_compat.py b/faststream/broker/fastapi/_compat.py index e99c199ae1..c51826690c 100644 --- a/faststream/broker/fastapi/_compat.py +++ b/faststream/broker/fastapi/_compat.py @@ -37,10 +37,10 @@ ) __all__ = ( + "RequestValidationError", "create_response_field", - "solve_faststream_dependency", "raise_fastapi_validation_error", - "RequestValidationError", + "solve_faststream_dependency", ) diff --git a/faststream/broker/subscriber/call_item.py b/faststream/broker/subscriber/call_item.py index a00d7e790c..72c8ae840c 100644 --- a/faststream/broker/subscriber/call_item.py +++ b/faststream/broker/subscriber/call_item.py @@ -37,13 +37,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] diff --git a/faststream/broker/wrapper/call.py b/faststream/broker/wrapper/call.py index 1ae083dd7f..3072547688 100644 --- a/faststream/broker/wrapper/call.py +++ b/faststream/broker/wrapper/call.py @@ -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__( diff --git a/faststream/confluent/__init__.py b/faststream/confluent/__init__.py index a7961b35b3..17b9d19d01 100644 --- a/faststream/confluent/__init__.py +++ b/faststream/confluent/__init__.py @@ -9,11 +9,11 @@ __all__ = ( "KafkaBroker", "KafkaMessage", - "KafkaRouter", - "KafkaRoute", "KafkaPublisher", "KafkaResponse", - "TopicPartition", - "TestKafkaBroker", + "KafkaRoute", + "KafkaRouter", "TestApp", + "TestKafkaBroker", + "TopicPartition", ) diff --git a/faststream/confluent/annotations.py b/faststream/confluent/annotations.py index 27d0b68688..fec41b3817 100644 --- a/faststream/confluent/annotations.py +++ b/faststream/confluent/annotations.py @@ -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")] diff --git a/faststream/confluent/fastapi/__init__.py b/faststream/confluent/fastapi/__init__.py index 11fcd167df..352142194a 100644 --- a/faststream/confluent/fastapi/__init__.py +++ b/faststream/confluent/fastapi/__init__.py @@ -8,12 +8,12 @@ __all__ = ( "Context", - "Logger", "ContextRepo", - "KafkaRouter", - "KafkaMessage", "KafkaBroker", + "KafkaMessage", "KafkaProducer", + "KafkaRouter", + "Logger", ) KafkaMessage = Annotated[KM, Context("message")] diff --git a/faststream/confluent/schemas/partition.py b/faststream/confluent/schemas/partition.py index 97387fc9d3..ace5c78ca3 100644 --- a/faststream/confluent/schemas/partition.py +++ b/faststream/confluent/schemas/partition.py @@ -15,11 +15,11 @@ class _TopicKwargs(TypedDict): class TopicPartition: __slots__ = ( - "topic", - "partition", - "offset", - "metadata", "leader_epoch", + "metadata", + "offset", + "partition", + "topic", ) def __init__( diff --git a/faststream/kafka/__init__.py b/faststream/kafka/__init__.py index dc5f5e3cf6..12e349b08b 100644 --- a/faststream/kafka/__init__.py +++ b/faststream/kafka/__init__.py @@ -10,11 +10,11 @@ __all__ = ( "KafkaBroker", "KafkaMessage", - "KafkaRouter", - "KafkaRoute", - "KafkaResponse", "KafkaPublisher", - "TestKafkaBroker", + "KafkaResponse", + "KafkaRoute", + "KafkaRouter", "TestApp", + "TestKafkaBroker", "TopicPartition", ) diff --git a/faststream/kafka/annotations.py b/faststream/kafka/annotations.py index efca62b227..fc735bd439 100644 --- a/faststream/kafka/annotations.py +++ b/faststream/kafka/annotations.py @@ -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")] diff --git a/faststream/kafka/fastapi/__init__.py b/faststream/kafka/fastapi/__init__.py index 629539ba98..88c88f215f 100644 --- a/faststream/kafka/fastapi/__init__.py +++ b/faststream/kafka/fastapi/__init__.py @@ -8,12 +8,12 @@ __all__ = ( "Context", - "Logger", "ContextRepo", - "KafkaRouter", - "KafkaMessage", "KafkaBroker", + "KafkaMessage", "KafkaProducer", + "KafkaRouter", + "Logger", ) KafkaMessage = Annotated[KM, Context("message")] diff --git a/faststream/nats/__init__.py b/faststream/nats/__init__.py index bae483a17e..5ee2b42c61 100644 --- a/faststream/nats/__init__.py +++ b/faststream/nats/__init__.py @@ -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", ) diff --git a/faststream/nats/annotations.py b/faststream/nats/annotations.py index dabbcaa39a..b93ba4e6e0 100644 --- a/faststream/nats/annotations.py +++ b/faststream/nats/annotations.py @@ -12,13 +12,13 @@ from faststream.utils.context import Context __all__ = ( - "Logger", - "ContextRepo", - "NoCast", - "NatsMessage", - "NatsBroker", "Client", + "ContextRepo", "JsClient", + "Logger", + "NatsBroker", + "NatsMessage", + "NoCast", "ObjectStorage", ) diff --git a/faststream/nats/fastapi/__init__.py b/faststream/nats/fastapi/__init__.py index c1dc63c8a9..56b2eb0f05 100644 --- a/faststream/nats/fastapi/__init__.py +++ b/faststream/nats/fastapi/__init__.py @@ -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", ) diff --git a/faststream/nats/helpers/__init__.py b/faststream/nats/helpers/__init__.py index 28b3479a7b..e6e661ff97 100644 --- a/faststream/nats/helpers/__init__.py +++ b/faststream/nats/helpers/__init__.py @@ -4,6 +4,6 @@ __all__ = ( "KVBucketDeclarer", - "StreamBuilder", "OSBucketDeclarer", + "StreamBuilder", ) diff --git a/faststream/nats/schemas/__init__.py b/faststream/nats/schemas/__init__.py index ca9f56f48d..1edd51bcbe 100644 --- a/faststream/nats/schemas/__init__.py +++ b/faststream/nats/schemas/__init__.py @@ -5,7 +5,7 @@ __all__ = ( "JStream", - "PullSub", "KvWatch", "ObjWatch", + "PullSub", ) diff --git a/faststream/nats/schemas/js_stream.py b/faststream/nats/schemas/js_stream.py index 7a7450dd70..017691da23 100644 --- a/faststream/nats/schemas/js_stream.py +++ b/faststream/nats/schemas/js_stream.py @@ -23,10 +23,10 @@ class JStream(NameRequired): """A class to represent a JetStream stream.""" __slots__ = ( - "name", "config", - "subjects", "declare", + "name", + "subjects", ) def __init__( diff --git a/faststream/nats/schemas/kv_watch.py b/faststream/nats/schemas/kv_watch.py index d756f8d28d..e99a5f5084 100644 --- a/faststream/nats/schemas/kv_watch.py +++ b/faststream/nats/schemas/kv_watch.py @@ -19,13 +19,13 @@ class KvWatch(NameRequired): __slots__ = ( "bucket", + "declare", "headers_only", - "include_history", "ignore_deletes", - "meta_only", "inactive_threshold", + "include_history", + "meta_only", "timeout", - "declare", ) def __init__( diff --git a/faststream/nats/schemas/obj_watch.py b/faststream/nats/schemas/obj_watch.py index 3a5648e7c8..a1f11d4667 100644 --- a/faststream/nats/schemas/obj_watch.py +++ b/faststream/nats/schemas/obj_watch.py @@ -13,11 +13,11 @@ class ObjWatch: """ __slots__ = ( + "declare", "ignore_deletes", "include_history", "meta_only", "timeout", - "declare", ) def __init__( diff --git a/faststream/opentelemetry/middleware.py b/faststream/opentelemetry/middleware.py index 97cb7ddd14..e40ac577d3 100644 --- a/faststream/opentelemetry/middleware.py +++ b/faststream/opentelemetry/middleware.py @@ -41,10 +41,10 @@ class _MetricsContainer: __slots__ = ( "include_messages_counters", - "publish_duration", - "publish_counter", - "process_duration", "process_counter", + "process_duration", + "publish_counter", + "publish_duration", ) def __init__(self, meter: "Meter", include_messages_counters: bool) -> None: @@ -284,10 +284,10 @@ async def after_processed( class TelemetryMiddleware: # NOTE: should it be class or function? __slots__ = ( - "_tracer", "_meter", "_metrics", "_settings_provider_factory", + "_tracer", ) def __init__( diff --git a/faststream/prometheus/__init__.py b/faststream/prometheus/__init__.py index 8b21a09eee..e604b8cef7 100644 --- a/faststream/prometheus/__init__.py +++ b/faststream/prometheus/__init__.py @@ -4,6 +4,6 @@ __all__ = ( "BasePrometheusMiddleware", - "MetricsSettingsProvider", "ConsumeAttrs", + "MetricsSettingsProvider", ) diff --git a/faststream/prometheus/container.py b/faststream/prometheus/container.py index 6ac764866e..08174f5172 100644 --- a/faststream/prometheus/container.py +++ b/faststream/prometheus/container.py @@ -9,17 +9,17 @@ class MetricsContainer: __slots__ = ( - "_registry", "_metrics_prefix", - "received_messages_total", + "_registry", + "published_messages_duration_seconds", + "published_messages_exceptions_total", + "published_messages_total", + "received_messages_in_process", "received_messages_size_bytes", + "received_messages_total", "received_processed_messages_duration_seconds", - "received_messages_in_process", - "received_processed_messages_total", "received_processed_messages_exceptions_total", - "published_messages_total", - "published_messages_duration_seconds", - "published_messages_exceptions_total", + "received_processed_messages_total", ) DEFAULT_SIZE_BUCKETS = ( diff --git a/faststream/prometheus/manager.py b/faststream/prometheus/manager.py index e2f7704f77..10c4211153 100644 --- a/faststream/prometheus/manager.py +++ b/faststream/prometheus/manager.py @@ -3,7 +3,7 @@ class MetricsManager: - __slots__ = ("_container", "_app_name") + __slots__ = ("_app_name", "_container") def __init__(self, container: MetricsContainer, *, app_name: str = "faststream"): self._container = container diff --git a/faststream/rabbit/__init__.py b/faststream/rabbit/__init__.py index cfc152d4e0..15b323772c 100644 --- a/faststream/rabbit/__init__.py +++ b/faststream/rabbit/__init__.py @@ -12,17 +12,17 @@ from faststream.testing.app import TestApp __all__ = ( - "RabbitBroker", - "TestApp", - "TestRabbitBroker", - "RabbitRouter", - "RabbitRoute", - "RabbitPublisher", - "RabbitResponse", "ExchangeType", - "ReplyConfig", + "RabbitBroker", "RabbitExchange", - "RabbitQueue", # Annotations "RabbitMessage", + "RabbitPublisher", + "RabbitQueue", + "RabbitResponse", + "RabbitRoute", + "RabbitRouter", + "ReplyConfig", + "TestApp", + "TestRabbitBroker", ) diff --git a/faststream/rabbit/annotations.py b/faststream/rabbit/annotations.py index f32654d2cc..aaa7b3eec2 100644 --- a/faststream/rabbit/annotations.py +++ b/faststream/rabbit/annotations.py @@ -8,14 +8,14 @@ from faststream.utils.context import Context __all__ = ( - "Logger", + "Channel", + "Connection", "ContextRepo", + "Logger", "NoCast", - "RabbitMessage", "RabbitBroker", + "RabbitMessage", "RabbitProducer", - "Channel", - "Connection", ) RabbitMessage = Annotated[RM, Context("message")] diff --git a/faststream/rabbit/fastapi/__init__.py b/faststream/rabbit/fastapi/__init__.py index 06f1226e58..a46505cc82 100644 --- a/faststream/rabbit/fastapi/__init__.py +++ b/faststream/rabbit/fastapi/__init__.py @@ -12,10 +12,10 @@ __all__ = ( "Context", - "Logger", "ContextRepo", - "RabbitMessage", + "Logger", "RabbitBroker", + "RabbitMessage", "RabbitProducer", "RabbitRouter", ) diff --git a/faststream/rabbit/schemas/__init__.py b/faststream/rabbit/schemas/__init__.py index ddfb3635cc..2742cf2a68 100644 --- a/faststream/rabbit/schemas/__init__.py +++ b/faststream/rabbit/schemas/__init__.py @@ -5,12 +5,12 @@ from faststream.rabbit.schemas.reply import ReplyConfig __all__ = ( + "RABBIT_REPLY", + "BaseRMQInformation", "ExchangeType", - "RabbitQueue", "RabbitExchange", + "RabbitQueue", "ReplyConfig", - "RABBIT_REPLY", - "BaseRMQInformation", ) RABBIT_REPLY = RabbitQueue("amq.rabbitmq.reply-to", passive=True) diff --git a/faststream/rabbit/schemas/exchange.py b/faststream/rabbit/schemas/exchange.py index a9dfae79a1..6ff816bb10 100644 --- a/faststream/rabbit/schemas/exchange.py +++ b/faststream/rabbit/schemas/exchange.py @@ -15,17 +15,17 @@ class RabbitExchange(NameRequired): """A class to represent a RabbitMQ exchange.""" __slots__ = ( - "name", - "type", - "durable", + "arguments", "auto_delete", + "bind_arguments", + "bind_to", + "durable", + "name", "passive", - "arguments", - "timeout", "robust", - "bind_to", - "bind_arguments", "routing_key", + "timeout", + "type", ) def __hash__(self) -> int: diff --git a/faststream/rabbit/schemas/queue.py b/faststream/rabbit/schemas/queue.py index a9bccf013d..1eadaf1e24 100644 --- a/faststream/rabbit/schemas/queue.py +++ b/faststream/rabbit/schemas/queue.py @@ -21,17 +21,17 @@ class RabbitQueue(NameRequired): """ __slots__ = ( - "name", + "arguments", + "auto_delete", + "bind_arguments", "durable", "exclusive", + "name", "passive", - "auto_delete", - "arguments", - "timeout", + "path_regex", "robust", "routing_key", - "path_regex", - "bind_arguments", + "timeout", ) def __hash__(self) -> int: diff --git a/faststream/rabbit/schemas/reply.py b/faststream/rabbit/schemas/reply.py index 0391d4bd8c..06acb377a9 100644 --- a/faststream/rabbit/schemas/reply.py +++ b/faststream/rabbit/schemas/reply.py @@ -7,8 +7,8 @@ class ReplyConfig: """Class to store a config for subscribers' replies.""" __slots__ = ( - "mandatory", "immediate", + "mandatory", "persist", ) diff --git a/faststream/redis/__init__.py b/faststream/redis/__init__.py index 7624747bf8..c83abee4d3 100644 --- a/faststream/redis/__init__.py +++ b/faststream/redis/__init__.py @@ -7,16 +7,16 @@ from faststream.testing.app import TestApp __all__ = ( + "ListSub", + "PubSub", "Redis", "RedisBroker", "RedisMessage", - "RedisRoute", - "RedisRouter", "RedisPublisher", "RedisResponse", - "TestRedisBroker", - "TestApp", - "PubSub", - "ListSub", + "RedisRoute", + "RedisRouter", "StreamSub", + "TestApp", + "TestRedisBroker", ) diff --git a/faststream/redis/annotations.py b/faststream/redis/annotations.py index 2e9741ef70..eb989438a7 100644 --- a/faststream/redis/annotations.py +++ b/faststream/redis/annotations.py @@ -7,12 +7,12 @@ from faststream.utils.context import Context __all__ = ( - "Logger", "ContextRepo", + "Logger", "NoCast", - "RedisMessage", - "RedisBroker", "Redis", + "RedisBroker", + "RedisMessage", ) RedisMessage = Annotated[UnifyRedisMessage, Context("message")] diff --git a/faststream/redis/fastapi/__init__.py b/faststream/redis/fastapi/__init__.py index e1f7993047..db8b797dda 100644 --- a/faststream/redis/fastapi/__init__.py +++ b/faststream/redis/fastapi/__init__.py @@ -8,12 +8,12 @@ __all__ = ( "Context", - "Logger", "ContextRepo", - "RedisRouter", - "RedisMessage", - "RedisBroker", + "Logger", "Redis", + "RedisBroker", + "RedisMessage", + "RedisRouter", ) RedisMessage = Annotated[RM, Context("message")] diff --git a/faststream/redis/schemas/__init__.py b/faststream/redis/schemas/__init__.py index 817d7a0654..e45791d755 100644 --- a/faststream/redis/schemas/__init__.py +++ b/faststream/redis/schemas/__init__.py @@ -3,8 +3,8 @@ from faststream.redis.schemas.stream_sub import StreamSub __all__ = ( - "PubSub", "ListSub", + "PubSub", "StreamSub", ) diff --git a/faststream/redis/schemas/list_sub.py b/faststream/redis/schemas/list_sub.py index 544db9e86e..f518f5cfb8 100644 --- a/faststream/redis/schemas/list_sub.py +++ b/faststream/redis/schemas/list_sub.py @@ -8,9 +8,9 @@ class ListSub(NameRequired): """A class to represent a Redis List subscriber.""" __slots__ = ( - "name", "batch", "max_records", + "name", "polling_interval", ) diff --git a/faststream/redis/schemas/pub_sub.py b/faststream/redis/schemas/pub_sub.py index 5277cc1213..3026d6d2dc 100644 --- a/faststream/redis/schemas/pub_sub.py +++ b/faststream/redis/schemas/pub_sub.py @@ -7,9 +7,9 @@ class PubSub(NameRequired): __slots__ = ( "name", - "polling_interval", - "pattern", "path_regex", + "pattern", + "polling_interval", ) def __init__( diff --git a/faststream/redis/schemas/stream_sub.py b/faststream/redis/schemas/stream_sub.py index 7ab768cb28..70e2d9b3c5 100644 --- a/faststream/redis/schemas/stream_sub.py +++ b/faststream/redis/schemas/stream_sub.py @@ -9,15 +9,15 @@ class StreamSub(NameRequired): """A class to represent a Redis Stream subscriber.""" __slots__ = ( - "name", - "polling_interval", - "last_id", - "group", - "consumer", - "no_ack", "batch", + "consumer", + "group", + "last_id", "max_records", "maxlen", + "name", + "no_ack", + "polling_interval", ) def __init__( diff --git a/faststream/security.py b/faststream/security.py index 352acffb22..cc693057c6 100644 --- a/faststream/security.py +++ b/faststream/security.py @@ -47,10 +47,10 @@ class SASLPlaintext(BaseSecurity): # TODO: mv to SecretStr __slots__ = ( - "use_ssl", + "password", "ssl_context", + "use_ssl", "username", - "password", ) def __init__( @@ -85,10 +85,10 @@ class SASLScram256(BaseSecurity): # TODO: mv to SecretStr __slots__ = ( - "use_ssl", + "password", "ssl_context", + "use_ssl", "username", - "password", ) def __init__( @@ -123,10 +123,10 @@ class SASLScram512(BaseSecurity): # TODO: mv to SecretStr __slots__ = ( - "use_ssl", + "password", "ssl_context", + "use_ssl", "username", - "password", ) def __init__( @@ -159,7 +159,7 @@ class SASLOAuthBearer(BaseSecurity): This class defines basic security configuration for SASL/OAUTHBEARER authentication. """ - __slots__ = ("use_ssl", "ssl_context") + __slots__ = ("ssl_context", "use_ssl") def get_requirement(self) -> List["AnyDict"]: """Get the security requirements for SASL/OAUTHBEARER authentication.""" @@ -176,7 +176,7 @@ class SASLGSSAPI(BaseSecurity): This class defines security configuration for SASL/GSSAPI authentication. """ - __slots__ = ("use_ssl", "ssl_context") + __slots__ = ("ssl_context", "use_ssl") def get_requirement(self) -> List["AnyDict"]: """Get the security requirements for SASL/GSSAPI authentication.""" diff --git a/faststream/utils/__init__.py b/faststream/utils/__init__.py index 049e708b4d..18f6b4c7f5 100644 --- a/faststream/utils/__init__.py +++ b/faststream/utils/__init__.py @@ -5,12 +5,12 @@ from faststream.utils.no_cast import NoCast __all__ = ( - "apply_types", - "context", "Context", - "Header", - "Path", "ContextRepo", "Depends", + "Header", "NoCast", + "Path", + "apply_types", + "context", ) diff --git a/faststream/utils/context/__init__.py b/faststream/utils/context/__init__.py index 0c4609c499..054ce3f1a5 100644 --- a/faststream/utils/context/__init__.py +++ b/faststream/utils/context/__init__.py @@ -3,8 +3,8 @@ __all__ = ( "Context", - "context", "ContextRepo", "Header", "Path", + "context", ) diff --git a/faststream/utils/functions.py b/faststream/utils/functions.py index 685ab7da90..5e4ce4b2c8 100644 --- a/faststream/utils/functions.py +++ b/faststream/utils/functions.py @@ -20,10 +20,10 @@ __all__ = ( "call_or_await", - "to_async", - "timeout_scope", - "fake_context", "drop_response_type", + "fake_context", + "timeout_scope", + "to_async", ) diff --git a/pyproject.toml b/pyproject.toml index 2d0322dca9..4541e6f5b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -80,7 +80,7 @@ otel = ["opentelemetry-sdk>=1.24.0,<2.0.0"] cli = [ "typer>=0.9,!=0.12,<1", - "watchfiles>=0.15.0,<0.25.0" + "watchfiles>=0.15.0,<1.1.0" ] prometheus = ["prometheus-client>=0.20.0,<0.30.0"] @@ -89,7 +89,7 @@ prometheus = ["prometheus-client>=0.20.0,<0.30.0"] optionals = ["faststream[rabbit,kafka,confluent,nats,redis,otel,cli,prometheus]"] devdocs = [ - "mkdocs-material==9.5.44", + "mkdocs-material==9.5.46", "mkdocs-static-i18n==1.2.3", "mdx-include==1.4.2", "mkdocstrings[python]==0.27.0", @@ -121,15 +121,15 @@ types = [ lint = [ "faststream[types]", - "ruff==0.7.4", + "ruff==0.8.0", "bandit==1.7.10", - "semgrep==1.96.0", + "semgrep==1.97.0", "codespell==2.3.0", ] test-core = [ "coverage[toml]==7.6.1; python_version == '3.8'", - "coverage[toml]==7.6.7; python_version >= '3.9'", + "coverage[toml]==7.6.8; python_version >= '3.9'", "pytest==8.3.3", "pytest-asyncio==0.24.0", "dirty-equals==0.8.0",