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

Type-annotate dtypes.promote() #507

Open
wants to merge 1 commit into
base: fbsync
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion torcharrow/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ def infer_dype_from_callable_hint(
]


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

lt = l.typecode
Expand Down