Skip to content

Commit

Permalink
Fix incorrect type hints in Client (apache#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
BewareMyPower authored Mar 21, 2024
1 parent af6a555 commit d1727cf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pulsar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"""

import logging
from typing import List, Tuple, Optional
from typing import List, Tuple, Optional, Union

import _pulsar

Expand Down Expand Up @@ -627,7 +627,7 @@ def create_producer(self, topic,
properties=None,
batching_type: BatchingType = BatchingType.Default,
encryption_key=None,
crypto_key_reader: CryptoKeyReader = None,
crypto_key_reader: Union[None, CryptoKeyReader] = None,
access_mode: ProducerAccessMode = ProducerAccessMode.Shared,
):
"""
Expand Down Expand Up @@ -804,7 +804,7 @@ def subscribe(self, topic, subscription_name,
properties=None,
pattern_auto_discovery_period=60,
initial_position: InitialPosition = InitialPosition.Latest,
crypto_key_reader: CryptoKeyReader = None,
crypto_key_reader: Union[None, CryptoKeyReader] = None,
replicate_subscription_state_enabled=False,
max_pending_chunked_message=10,
auto_ack_oldest_chunked_message_on_queue_full=False,
Expand All @@ -813,7 +813,7 @@ def subscribe(self, topic, subscription_name,
key_shared_policy=None,
batch_index_ack_enabled=False,
regex_subscription_mode: RegexSubscriptionMode = RegexSubscriptionMode.PersistentOnly,
dead_letter_policy: ConsumerDeadLetterPolicy = None,
dead_letter_policy: Union[None, ConsumerDeadLetterPolicy] = None,
):
"""
Subscribe to the given topic and subscription combination.
Expand Down Expand Up @@ -1005,7 +1005,7 @@ def create_reader(self, topic, start_message_id,
reader_name=None,
subscription_role_prefix=None,
is_read_compacted=False,
crypto_key_reader: CryptoKeyReader = None,
crypto_key_reader: Union[None, CryptoKeyReader] = None,
start_message_id_inclusive=False
):
"""
Expand Down

0 comments on commit d1727cf

Please sign in to comment.