Skip to content

Commit 43efd57

Browse files
committed
refact: improve typing
1 parent 04405b4 commit 43efd57

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/api/check.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ def is_temporary_value(node) -> bool:
406406
return node.token not in ("STRING", "VAR") and node.t[0] not in ("_", "#")
407407

408408

409-
def common_type(a, b):
409+
def common_type(a: symbols.TYPE | Type | None, b: symbols.TYPE | Type | None) -> symbols.TYPE | Type | None:
410410
"""Returns a type which is common for both a and b types.
411411
Returns None if no common types allowed.
412412
"""
@@ -435,7 +435,7 @@ def common_type(a, b):
435435
assert a.is_basic
436436
assert b.is_basic
437437

438-
types = (a, b)
438+
types = a, b
439439

440440
if Type.float_ in types:
441441
return Type.float_

0 commit comments

Comments
 (0)