We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04405b4 commit 43efd57Copy full SHA for 43efd57
1 file changed
src/api/check.py
@@ -406,7 +406,7 @@ def is_temporary_value(node) -> bool:
406
return node.token not in ("STRING", "VAR") and node.t[0] not in ("_", "#")
407
408
409
-def common_type(a, b):
+def common_type(a: symbols.TYPE | Type | None, b: symbols.TYPE | Type | None) -> symbols.TYPE | Type | None:
410
"""Returns a type which is common for both a and b types.
411
Returns None if no common types allowed.
412
"""
@@ -435,7 +435,7 @@ def common_type(a, b):
435
assert a.is_basic
436
assert b.is_basic
437
438
- types = (a, b)
+ types = a, b
439
440
if Type.float_ in types:
441
return Type.float_
0 commit comments