Skip to content
This repository was archived by the owner on Nov 1, 2024. It is now read-only.

Commit 74d0df7

Browse files
Yuan Chao Choufacebook-github-bot
authored andcommitted
Type-annotate dtypes.promote() (#507)
Summary: Pull Request resolved: #507 `dtypes.promote()` is not typed. Fix it Reviewed By: wenleix Differential Revision: D40330862 fbshipit-source-id: 343ff4398b42f3277df3f1779f16a455391be9e4
1 parent 608258f commit 74d0df7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torcharrow/dtypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def infer_dype_from_callable_hint(
364364
]
365365

366366

367-
def promote(l, r):
367+
def promote(l: DType, r: DType) -> ty.Optional[DType]:
368368
assert is_boolean_or_numerical(l) and is_boolean_or_numerical(r)
369369

370370
lt = l.typecode

0 commit comments

Comments
 (0)