Add better type hint for the output query type when compiling to a SQL backend #977
Labels
maintainer quality-of-life
Features that ease development, but are not necessarily visible to package users.
user friendliness
Currently,
CompilationResult
is an untypednamedtuple
, which means that it's unclear what is the type of itsquery
attribute. For non-SQL backends, it appears to bestr
, but for SQL it seems to be someSQLAlchemy
-specific type and it's not clear which of its superclasses/protocols we should claim as the return type.This is also a concern for the
insert_arguments_into_query
function, whose return type is the same type asCompilationResult.query
and currently set to the correct-but-extremely-impreciseAny
.The text was updated successfully, but these errors were encountered: