Skip to content

Commit 1900a0a

Browse files
committed
add function typehint for pylint
1 parent 04cbd5d commit 1900a0a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sdks/python/apache_beam/coders/coder_impl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,10 +376,11 @@ def _verify_dill_compat():
376376
raise RuntimeError(base_error + f". Found dill version '{dill.__version__}")
377377

378378

379+
dataclass_uses_kw_only: Callable[[Any], bool]
379380
if dataclasses:
380381
# Cache the result to avoid multiple checks for the same dataclass type.
381382
@functools.cache
382-
def dataclass_uses_kw_only(cls):
383+
def dataclass_uses_kw_only(cls) -> bool:
383384
return any(
384385
field.init and field.kw_only for field in dataclasses.fields(cls))
385386

0 commit comments

Comments
 (0)