From f6fba91fd203c33218f0f2fe64b4aaee3772f49f Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Mon, 10 Jan 2022 13:44:23 +0530 Subject: [PATCH] chore(typing): Add type hints in qb builder classes --- frappe/query_builder/builder.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frappe/query_builder/builder.py b/frappe/query_builder/builder.py index 8ae8324de4..d2fdeab324 100644 --- a/frappe/query_builder/builder.py +++ b/frappe/query_builder/builder.py @@ -1,6 +1,6 @@ from pypika import MySQLQuery, Order, PostgreSQLQuery, terms from pypika.dialects import MySQLQueryBuilder, PostgreSQLQueryBuilder -from pypika.queries import Schema, Table +from pypika.queries import QueryBuilder, Schema, Table from pypika.terms import Function from frappe.query_builder.terms import ParameterizedValueWrapper @@ -23,13 +23,13 @@ class Base: return Table(table_name, *args, **kwargs) @classmethod - def into(cls, table, *args, **kwargs): + def into(cls, table, *args, **kwargs) -> QueryBuilder: if isinstance(table, str): table = cls.DocType(table) return super().into(table, *args, **kwargs) @classmethod - def update(cls, table, *args, **kwargs): + def update(cls, table, *args, **kwargs) -> QueryBuilder: if isinstance(table, str): table = cls.DocType(table) return super().update(table, *args, **kwargs)