Skip to content

Commit

Permalink
Use Self type in _BaseKafkaQueueConsumerFactory.new() (#894)
Browse files Browse the repository at this point in the history
  • Loading branch information
salomon-smekecohen authored Apr 29, 2024
1 parent 08af744 commit 16e3934
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
3 changes: 2 additions & 1 deletion baseplate/frameworks/queue_consumer/kafka.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from prometheus_client import Counter
from prometheus_client import Gauge
from prometheus_client import Histogram
from typing_extensions import Self

from baseplate import Baseplate
from baseplate import RequestContext
Expand Down Expand Up @@ -268,7 +269,7 @@ def new(
health_check_fn: Optional[HealthcheckCallback] = None,
kafka_config: Optional[Dict[str, Any]] = None,
prometheus_client_name: str = "",
) -> "_BaseKafkaQueueConsumerFactory":
) -> Self:
"""Return a new `_BaseKafkaQueueConsumerFactory`.
This method will create the :py:class:`~confluent_kafka.Consumer` for you and is
Expand Down
13 changes: 1 addition & 12 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ requests = ">=2.21.0,<3.0"
sentry-sdk = { version = ">=1.35.0,<2.0", optional = true }
sqlalchemy = { version = ">=1.4.49,<2", optional = true }
thrift-unofficial = ">=0.19.0,<1.0"
typing-extensions = "^4.11.0"

[tool.poetry.extras]
amqp = ["kombu"]
Expand Down

0 comments on commit 16e3934

Please sign in to comment.