Skip to content

Commit ffb8b99

Browse files
committed
Clean up typing.
1 parent 78b8a07 commit ffb8b99

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

sdks/python/apache_beam/io/kafka.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
# pytype: skip-file
102102

103103
import typing
104+
import collections
104105

105106
import numpy as np
106107

@@ -122,7 +123,7 @@
122123
('allow_duplicates', typing.Optional[bool]),
123124
('dynamic_read_poll_interval_seconds', typing.Optional[int]),
124125
('consumer_factory_fn_class', typing.Optional[str]),
125-
('consumer_factory_fn_params', typing.Optional[typing.Mapping[str, str]])])
126+
('consumer_factory_fn_params', typing.Optional[collections.abc.Mapping[str, str]])])
126127

127128

128129
def default_io_expansion_service(append_args=None):
@@ -170,8 +171,8 @@ def __init__(
170171
redistribute_num_keys=np.int32(0),
171172
allow_duplicates=False,
172173
dynamic_read_poll_interval_seconds: typing.Optional[int] = None,
173-
consumer_factory_fn_class=None,
174-
consumer_factory_fn_params=None):
174+
consumer_factory_fn_class: typing.Optional[collections.abc.Mapping] = None,
175+
consumer_factory_fn_params: typing.Optional[collections.abc.Mapping] = None):
175176
"""
176177
Initializes a read operation from Kafka.
177178
@@ -218,7 +219,7 @@ def __init__(
218219
existing provided consumerFactoryFn. If not None, this will construct
219220
Kafka consumers with a custom configuration.
220221
:param consumer_factory_fn_params: A map which specifies the parameters for
221-
the provided consumer_factory_fn_class. IF not None, the values in this
222+
the provided consumer_factory_fn_class. If not None, the values in this
222223
map will be used when constructing the consumer_factory_fn_class object.
223224
This cannot be null if the consumer_factory_fn_class is not null.
224225
"""

0 commit comments

Comments
 (0)