fix(checker): correct return type for column aggregation
All checks were successful
Tests / tests (pull_request) Successful in 10s

This commit is contained in:
2026-07-24 00:03:26 +02:00
parent 3ab0dda682
commit e37432ad57
3 changed files with 17 additions and 46 deletions

View File

@@ -13,7 +13,6 @@ from midas.checker.types import (
Function,
ParamSpec,
Type,
UnknownType,
)
if TYPE_CHECKING:
@@ -97,11 +96,9 @@ class ColumnGroupByMethodRegistry(MethodRegistry[Call]):
positional=[],
keywords={},
)
if not isinstance(returns, ColumnType):
returns = ColumnType(type=UnknownType())
signature = Function(
params=ParamSpec(mixed=real_params),
returns=returns,
returns=ColumnType(type=returns),
)
result: CallResult = self.dispatcher.get_result(

View File

@@ -364,13 +364,11 @@ class ColumnMethodRegistry(MethodRegistry[Call]):
Type: the result type
"""
returns: Type = ColumnType(type=TopType())
returns: Type = TopType()
if formula:
returns = ColumnType(
type=self._resolve_formula_type(
call,
formula(call.column.type),
)
returns = self._resolve_formula_type(
call,
formula(call.column.type),
)
signature = Function(
params=ParamSpec(

View File

@@ -4305,9 +4305,7 @@
"arguments": [],
"keywords": {}
},
"type": {
"type": {}
}
"type": {}
},
{
"location": {
@@ -4342,9 +4340,7 @@
"arguments": [],
"keywords": {}
},
"type": {
"type": {}
}
"type": {}
},
{
"location": {
@@ -4380,9 +4376,7 @@
"keywords": {}
},
"type": {
"type": {
"name": "int"
}
"name": "int"
}
},
{
@@ -4419,9 +4413,7 @@
"keywords": {}
},
"type": {
"type": {
"name": "float"
}
"name": "float"
}
},
{
@@ -4458,9 +4450,7 @@
"keywords": {}
},
"type": {
"type": {
"name": "int"
}
"name": "int"
}
},
{
@@ -4497,9 +4487,7 @@
"keywords": {}
},
"type": {
"type": {
"name": "int"
}
"name": "int"
}
},
{
@@ -4536,9 +4524,7 @@
"keywords": {}
},
"type": {
"type": {
"name": "int"
}
"name": "int"
}
},
{
@@ -4575,9 +4561,7 @@
"keywords": {}
},
"type": {
"type": {
"name": "int"
}
"name": "int"
}
},
{
@@ -4614,9 +4598,7 @@
"keywords": {}
},
"type": {
"type": {
"name": "int"
}
"name": "int"
}
},
{
@@ -4652,9 +4634,7 @@
"arguments": [],
"keywords": {}
},
"type": {
"type": {}
}
"type": {}
},
{
"location": {
@@ -4690,9 +4670,7 @@
"keywords": {}
},
"type": {
"type": {
"name": "int"
}
"name": "int"
}
},
{
@@ -4728,9 +4706,7 @@
"arguments": [],
"keywords": {}
},
"type": {
"type": {}
}
"type": {}
},
{
"location": {