Update SQLAlchemy stubs to 1.4.46 (#9464)

Replace `Any` with `Incomplete` where applicable
This commit is contained in:
Sebastian Rittau
2023-01-05 20:37:12 +01:00
committed by GitHub
parent dfe844c200
commit b1cb9c8a8f
8 changed files with 289 additions and 259 deletions

View File

@@ -24,6 +24,7 @@ sqlalchemy.util.WeakSequence.__init__
# not always present
sqlalchemy.engine.Engine.logging_name # initialized if not None
sqlalchemy.engine.base.Engine.logging_name # initialized if not None
sqlalchemy.sql.lambdas.PyWrapper.__clause_element__
sqlalchemy.testing.util.non_refcount_gc_collect
# replaced at runtime
@@ -528,6 +529,7 @@ sqlalchemy.dialects.postgresql.Insert
sqlalchemy.dialects.postgresql.JSON
sqlalchemy.dialects.postgresql.JSONB
sqlalchemy.dialects.postgresql.MACADDR
sqlalchemy.dialects.postgresql.MACADDR8
sqlalchemy.dialects.postgresql.MONEY
sqlalchemy.dialects.postgresql.NUMERIC
sqlalchemy.dialects.postgresql.NUMRANGE
@@ -582,6 +584,7 @@ sqlalchemy.dialects.postgresql.base.INET
sqlalchemy.dialects.postgresql.base.INTEGER
sqlalchemy.dialects.postgresql.base.INTERVAL
sqlalchemy.dialects.postgresql.base.MACADDR
sqlalchemy.dialects.postgresql.base.MACADDR8
sqlalchemy.dialects.postgresql.base.MONEY
sqlalchemy.dialects.postgresql.base.NUMERIC
sqlalchemy.dialects.postgresql.base.OID

View File

@@ -1,4 +1,4 @@
version = "1.4.45"
version = "1.4.46"
extra_description = """\
The `sqlalchemy-stubs` package is an alternative to this package and also \
includes a mypy plugin for more precise types.\

View File

@@ -16,6 +16,7 @@ from .base import (
INTEGER as INTEGER,
INTERVAL as INTERVAL,
MACADDR as MACADDR,
MACADDR8 as MACADDR8,
MONEY as MONEY,
NUMERIC as NUMERIC,
OID as OID,
@@ -59,6 +60,7 @@ __all__ = (
"UUID",
"BIT",
"MACADDR",
"MACADDR8",
"MONEY",
"OID",
"REGCLASS",

View File

@@ -43,6 +43,11 @@ class MACADDR(sqltypes.TypeEngine):
PGMacAddr = MACADDR
class MACADDR8(sqltypes.TypeEngine):
__visit_name__: str
PGMacAddr8 = MACADDR8
class MONEY(sqltypes.TypeEngine):
__visit_name__: str

View File

@@ -1,77 +1,83 @@
from typing import Any, NamedTuple
from _typeshed import Incomplete
from typing import NamedTuple
from ..util import memoized_property
from . import elements
RESERVED_WORDS: Any
LEGAL_CHARACTERS: Any
LEGAL_CHARACTERS_PLUS_SPACE: Any
ILLEGAL_INITIAL_CHARACTERS: Any
FK_ON_DELETE: Any
FK_ON_UPDATE: Any
FK_INITIALLY: Any
BIND_PARAMS: Any
BIND_PARAMS_ESC: Any
BIND_TEMPLATES: Any
OPERATORS: Any
FUNCTIONS: Any
EXTRACT_MAP: Any
COMPOUND_KEYWORDS: Any
RESERVED_WORDS: Incomplete
LEGAL_CHARACTERS: Incomplete
LEGAL_CHARACTERS_PLUS_SPACE: Incomplete
ILLEGAL_INITIAL_CHARACTERS: Incomplete
FK_ON_DELETE: Incomplete
FK_ON_UPDATE: Incomplete
FK_INITIALLY: Incomplete
BIND_PARAMS: Incomplete
BIND_PARAMS_ESC: Incomplete
BIND_TEMPLATES: Incomplete
OPERATORS: Incomplete
FUNCTIONS: Incomplete
EXTRACT_MAP: Incomplete
COMPOUND_KEYWORDS: Incomplete
RM_RENDERED_NAME: int
RM_NAME: int
RM_OBJECTS: int
RM_TYPE: int
class ExpandedState(NamedTuple):
statement: Any
additional_parameters: Any
processors: Any
positiontup: Any
parameter_expansion: Any
statement: Incomplete
additional_parameters: Incomplete
processors: Incomplete
positiontup: Incomplete
parameter_expansion: Incomplete
NO_LINTING: Any
COLLECT_CARTESIAN_PRODUCTS: Any
WARN_LINTING: Any
FROM_LINTING: Any
NO_LINTING: Incomplete
COLLECT_CARTESIAN_PRODUCTS: Incomplete
WARN_LINTING: Incomplete
FROM_LINTING: Incomplete
class FromLinter:
def lint(self, start: Any | None = ...): ...
def lint(self, start: Incomplete | None = ...): ...
def warn(self) -> None: ...
class Compiled:
schema_translate_map: Any
execution_options: Any
compile_state: Any
cache_key: Any
dialect: Any
preparer: Any
statement: Any
can_execute: Any
string: Any
schema_translate_map: Incomplete
execution_options: Incomplete
compile_state: Incomplete
cache_key: Incomplete
dialect: Incomplete
preparer: Incomplete
statement: Incomplete
can_execute: Incomplete
string: Incomplete
def __init__(
self, dialect, statement, schema_translate_map: Any | None = ..., render_schema_translate: bool = ..., compile_kwargs=...
self,
dialect,
statement,
schema_translate_map: Incomplete | None = ...,
render_schema_translate: bool = ...,
compile_kwargs=...,
) -> None: ...
def visit_unsupported_compilation(self, element, err) -> None: ...
@property
def sql_compiler(self) -> None: ...
def process(self, obj, **kwargs): ...
def construct_params(
self, params: Any | None = ..., extracted_parameters: Any | None = ..., escape_names: bool = ...
self, params: Incomplete | None = ..., extracted_parameters: Incomplete | None = ..., escape_names: bool = ...
) -> None: ...
@property
def params(self): ...
class TypeCompiler:
ensure_kwarg: str
dialect: Any
dialect: Incomplete
def __init__(self, dialect) -> None: ...
def process(self, type_, **kw): ...
def visit_unsupported_compilation(self, element, err, **kw) -> None: ...
class _CompileLabel(elements.ColumnElement[Any]):
class _CompileLabel(elements.ColumnElement[Incomplete]):
__visit_name__: str
element: Any
name: Any
element: Incomplete
name: Incomplete
def __init__(self, col, name, alt_names=...) -> None: ...
@property
def proxy_set(self): ...
@@ -80,45 +86,45 @@ class _CompileLabel(elements.ColumnElement[Any]):
def self_group(self, **kw): ...
class SQLCompiler(Compiled):
extract_map: Any
compound_keywords: Any
extract_map: Incomplete
compound_keywords: Incomplete
isdelete: bool
isinsert: bool
isupdate: bool
isplaintext: bool
returning: Any
returning: Incomplete
returning_precedes_values: bool
render_table_with_column_in_update_from: bool
ansi_bind_rules: bool
insert_single_values_expr: Any
literal_execute_params: Any
post_compile_params: Any
escaped_bind_names: Any
insert_single_values_expr: Incomplete
literal_execute_params: Incomplete
post_compile_params: Incomplete
escaped_bind_names: Incomplete
has_out_parameters: bool
insert_prefetch: Any
update_prefetch: Any
insert_prefetch: Incomplete
update_prefetch: Incomplete
postfetch_lastrowid: bool
positiontup: Any
positiontup: Incomplete
inline: bool
column_keys: Any
cache_key: Any
for_executemany: Any
linting: Any
binds: Any
bind_names: Any
stack: Any
positional: Any
bindtemplate: Any
ctes: Any
label_length: Any
anon_map: Any
truncated_names: Any
column_keys: Incomplete
cache_key: Incomplete
for_executemany: Incomplete
linting: Incomplete
binds: Incomplete
bind_names: Incomplete
stack: Incomplete
positional: Incomplete
bindtemplate: Incomplete
ctes: Incomplete
label_length: Incomplete
anon_map: Incomplete
truncated_names: Incomplete
def __init__(
self,
dialect,
statement,
cache_key: Any | None = ...,
column_keys: Any | None = ...,
cache_key: Incomplete | None = ...,
column_keys: Incomplete | None = ...,
for_executemany: bool = ...,
linting=...,
**kwargs,
@@ -130,7 +136,7 @@ class SQLCompiler(Compiled):
def is_subquery(self): ...
@property
def sql_compiler(self): ...
def construct_params(self, params: Any | None = ..., _group_number: Any | None = ..., _check: bool = ..., extracted_parameters: Any | None = ..., escape_names: bool = ...): ... # type: ignore[override]
def construct_params(self, params: Incomplete | None = ..., _group_number: Incomplete | None = ..., _check: bool = ..., extracted_parameters: Incomplete | None = ..., escape_names: bool = ...): ... # type: ignore[override]
@property
def params(self): ...
def default_from(self): ...
@@ -141,16 +147,16 @@ class SQLCompiler(Compiled):
def visit_label(
self,
label,
add_to_result_map: Any | None = ...,
add_to_result_map: Incomplete | None = ...,
within_label_clause: bool = ...,
within_columns_clause: bool = ...,
render_label_as_label: Any | None = ...,
render_label_as_label: Incomplete | None = ...,
result_map_targets=...,
**kw,
): ...
def visit_lambda_element(self, element, **kw): ...
def visit_column(
self, column, add_to_result_map: Any | None = ..., include_table: bool = ..., result_map_targets=..., **kwargs
self, column, add_to_result_map: Incomplete | None = ..., include_table: bool = ..., result_map_targets=..., **kwargs
): ...
def visit_collation(self, element, **kw): ...
def visit_fromclause(self, fromclause, **kwargs): ...
@@ -158,8 +164,8 @@ class SQLCompiler(Compiled):
def visit_typeclause(self, typeclause, **kw): ...
def post_process_text(self, text): ...
def escape_literal_column(self, text): ...
def visit_textclause(self, textclause, add_to_result_map: Any | None = ..., **kw): ...
def visit_textual_select(self, taf, compound_index: Any | None = ..., asfrom: bool = ..., **kw): ...
def visit_textclause(self, textclause, add_to_result_map: Incomplete | None = ..., **kw): ...
def visit_textual_select(self, taf, compound_index: Incomplete | None = ..., asfrom: bool = ..., **kw): ...
def visit_null(self, expr, **kw): ...
def visit_true(self, expr, **kw): ...
def visit_false(self, expr, **kw): ...
@@ -173,13 +179,13 @@ class SQLCompiler(Compiled):
def visit_funcfilter(self, funcfilter, **kwargs): ...
def visit_extract(self, extract, **kwargs): ...
def visit_scalar_function_column(self, element, **kw): ...
def visit_function(self, func, add_to_result_map: Any | None = ..., **kwargs): ...
def visit_function(self, func, add_to_result_map: Incomplete | None = ..., **kwargs): ...
def visit_next_value_func(self, next_value, **kw): ...
def visit_sequence(self, sequence, **kw) -> None: ...
def function_argspec(self, func, **kwargs): ...
compile_state: Any
def visit_compound_select(self, cs, asfrom: bool = ..., compound_index: Any | None = ..., **kwargs): ...
def visit_unary(self, unary, add_to_result_map: Any | None = ..., result_map_targets=..., **kw): ...
compile_state: Incomplete
def visit_compound_select(self, cs, asfrom: bool = ..., compound_index: Incomplete | None = ..., **kwargs): ...
def visit_unary(self, unary, add_to_result_map: Incomplete | None = ..., result_map_targets=..., **kw): ...
def visit_is_true_unary_operator(self, element, operator, **kw): ...
def visit_is_false_unary_operator(self, element, operator, **kw): ...
def visit_not_match_op_binary(self, binary, operator, **kw): ...
@@ -189,10 +195,10 @@ class SQLCompiler(Compiled):
def visit_binary(
self,
binary,
override_operator: Any | None = ...,
override_operator: Incomplete | None = ...,
eager_grouping: bool = ...,
from_linter: Any | None = ...,
lateral_from_linter: Any | None = ...,
from_linter: Incomplete | None = ...,
lateral_from_linter: Incomplete | None = ...,
**kw,
): ...
def visit_function_as_comparison_op_binary(self, element, operator, **kw): ...
@@ -225,27 +231,29 @@ class SQLCompiler(Compiled):
render_postcompile: bool = ...,
**kwargs,
): ...
def render_literal_bindparam(self, bindparam, render_literal_value=..., **kw): ...
def render_literal_bindparam(
self, bindparam, render_literal_value=..., bind_expression_template: Incomplete | None = ..., **kw
): ...
def render_literal_value(self, value, type_): ...
def bindparam_string(
self,
name,
positional_names: Any | None = ...,
positional_names: Incomplete | None = ...,
post_compile: bool = ...,
expanding: bool = ...,
escaped_from: Any | None = ...,
escaped_from: Incomplete | None = ...,
**kw,
): ...
execution_options: Any
execution_options: Incomplete
ctes_recursive: bool
def visit_cte(
self,
cte,
asfrom: bool = ...,
ashint: bool = ...,
fromhints: Any | None = ...,
visiting_cte: Any | None = ...,
from_linter: Any | None = ...,
fromhints: Incomplete | None = ...,
visiting_cte: Incomplete | None = ...,
from_linter: Incomplete | None = ...,
**kwargs,
): ...
def visit_table_valued_alias(self, element, **kw): ...
@@ -256,34 +264,34 @@ class SQLCompiler(Compiled):
asfrom: bool = ...,
ashint: bool = ...,
iscrud: bool = ...,
fromhints: Any | None = ...,
fromhints: Incomplete | None = ...,
subquery: bool = ...,
lateral: bool = ...,
enclosing_alias: Any | None = ...,
from_linter: Any | None = ...,
enclosing_alias: Incomplete | None = ...,
from_linter: Incomplete | None = ...,
**kwargs,
): ...
def visit_subquery(self, subquery, **kw): ...
def visit_lateral(self, lateral_, **kw): ...
def visit_tablesample(self, tablesample, asfrom: bool = ..., **kw): ...
def visit_values(self, element, asfrom: bool = ..., from_linter: Any | None = ..., **kw): ...
def visit_values(self, element, asfrom: bool = ..., from_linter: Incomplete | None = ..., **kw): ...
def get_render_as_alias_suffix(self, alias_name_text): ...
def format_from_hint_text(self, sqltext, table, hint, iscrud): ...
def get_select_hint_text(self, byfroms) -> None: ...
def get_from_hint_text(self, table, text) -> None: ...
def get_crud_hint_text(self, table, text) -> None: ...
def get_statement_hint_text(self, hint_texts): ...
translate_select_structure: Any
translate_select_structure: Incomplete
def visit_select(
self,
select_stmt,
asfrom: bool = ...,
insert_into: bool = ...,
fromhints: Any | None = ...,
compound_index: Any | None = ...,
select_wraps_for: Any | None = ...,
fromhints: Incomplete | None = ...,
compound_index: Incomplete | None = ...,
select_wraps_for: Incomplete | None = ...,
lateral: bool = ...,
from_linter: Any | None = ...,
from_linter: Incomplete | None = ...,
**kwargs,
): ...
def get_cte_preamble(self, recursive): ...
@@ -300,12 +308,12 @@ class SQLCompiler(Compiled):
asfrom: bool = ...,
iscrud: bool = ...,
ashint: bool = ...,
fromhints: Any | None = ...,
fromhints: Incomplete | None = ...,
use_schema: bool = ...,
from_linter: Any | None = ...,
from_linter: Incomplete | None = ...,
**kwargs,
): ...
def visit_join(self, join, asfrom: bool = ..., from_linter: Any | None = ..., **kwargs): ...
def visit_join(self, join, asfrom: bool = ..., from_linter: Incomplete | None = ..., **kwargs): ...
def visit_insert(self, insert_stmt, **kw): ...
def update_limit_clause(self, update_stmt) -> None: ...
def update_tables_clause(self, update_stmt, from_table, extra_froms, **kw): ...
@@ -339,14 +347,14 @@ class DDLCompiler(Compiled):
@memoized_property
def type_compiler(self): ...
def construct_params(
self, params: Any | None = ..., extracted_parameters: Any | None = ..., escape_names: bool = ...
self, params: Incomplete | None = ..., extracted_parameters: Incomplete | None = ..., escape_names: bool = ...
) -> None: ...
def visit_ddl(self, ddl, **kwargs): ...
def visit_create_schema(self, create, **kw): ...
def visit_drop_schema(self, drop, **kw): ...
def visit_create_table(self, create, **kw): ...
def visit_create_column(self, create, first_pk: bool = ..., **kw): ...
def create_table_constraints(self, table, _include_foreign_key_constraints: Any | None = ..., **kw): ...
def create_table_constraints(self, table, _include_foreign_key_constraints: Incomplete | None = ..., **kw): ...
def visit_drop_table(self, drop, **kw): ...
def visit_drop_view(self, drop, **kw): ...
def visit_create_index(self, create, include_schema: bool = ..., include_table_schema: bool = ..., **kw): ...
@@ -357,7 +365,7 @@ class DDLCompiler(Compiled):
def visit_set_column_comment(self, create, **kw): ...
def visit_drop_column_comment(self, drop, **kw): ...
def get_identity_options(self, identity_options): ...
def visit_create_sequence(self, create, prefix: Any | None = ..., **kw): ...
def visit_create_sequence(self, create, prefix: Incomplete | None = ..., **kw): ...
def visit_drop_sequence(self, drop, **kw): ...
def visit_drop_constraint(self, drop, **kw): ...
def get_column_specification(self, column, **kwargs): ...
@@ -427,50 +435,50 @@ class StrSQLTypeCompiler(GenericTypeCompiler):
def visit_user_defined(self, type_, **kw): ...
class IdentifierPreparer:
reserved_words: Any
legal_characters: Any
illegal_initial_characters: Any
schema_for_object: Any
dialect: Any
initial_quote: Any
final_quote: Any
escape_quote: Any
escape_to_quote: Any
omit_schema: Any
quote_case_sensitive_collations: Any
reserved_words: Incomplete
legal_characters: Incomplete
illegal_initial_characters: Incomplete
schema_for_object: Incomplete
dialect: Incomplete
initial_quote: Incomplete
final_quote: Incomplete
escape_quote: Incomplete
escape_to_quote: Incomplete
omit_schema: Incomplete
quote_case_sensitive_collations: Incomplete
def __init__(
self,
dialect,
initial_quote: str = ...,
final_quote: Any | None = ...,
final_quote: Incomplete | None = ...,
escape_quote: str = ...,
quote_case_sensitive_collations: bool = ...,
omit_schema: bool = ...,
) -> None: ...
def validate_sql_phrase(self, element, reg): ...
def quote_identifier(self, value): ...
def quote_schema(self, schema, force: Any | None = ...): ...
def quote(self, ident, force: Any | None = ...): ...
def quote_schema(self, schema, force: Incomplete | None = ...): ...
def quote(self, ident, force: Incomplete | None = ...): ...
def format_collation(self, collation_name): ...
def format_sequence(self, sequence, use_schema: bool = ...): ...
def format_label(self, label, name: Any | None = ...): ...
def format_alias(self, alias, name: Any | None = ...): ...
def format_savepoint(self, savepoint, name: Any | None = ...): ...
def format_label(self, label, name: Incomplete | None = ...): ...
def format_alias(self, alias, name: Incomplete | None = ...): ...
def format_savepoint(self, savepoint, name: Incomplete | None = ...): ...
def format_constraint(self, constraint, _alembic_quote: bool = ...): ...
def truncate_and_render_index_name(self, name, _alembic_quote: bool = ...): ...
def truncate_and_render_constraint_name(self, name, _alembic_quote: bool = ...): ...
def format_index(self, index): ...
def format_table(self, table, use_schema: bool = ..., name: Any | None = ...): ...
def format_table(self, table, use_schema: bool = ..., name: Incomplete | None = ...): ...
def format_schema(self, name): ...
def format_label_name(self, name, anon_map: Any | None = ...): ...
def format_label_name(self, name, anon_map: Incomplete | None = ...): ...
def format_column(
self,
column,
use_table: bool = ...,
name: Any | None = ...,
table_name: Any | None = ...,
name: Incomplete | None = ...,
table_name: Incomplete | None = ...,
use_schema: bool = ...,
anon_map: Any | None = ...,
anon_map: Incomplete | None = ...,
): ...
def format_table_seq(self, table, use_schema: bool = ...): ...
def unformat_identifiers(self, identifiers): ...

View File

@@ -1,4 +1,4 @@
from typing import Any
from _typeshed import Incomplete
from .base import PARSE_AUTOCOMMIT as PARSE_AUTOCOMMIT, ColumnCollection as ColumnCollection, Executable as Executable
from .dml import Delete as Delete, Insert as Insert, Update as Update, UpdateBase as UpdateBase, ValuesBase as ValuesBase
@@ -154,48 +154,48 @@ __all__ = [
"values",
]
all_: Any
any_: Any
and_: Any
alias: Any
tablesample: Any
lateral: Any
or_: Any
bindparam: Any
select: Any
text: Any
table: Any
column: Any
over: Any
within_group: Any
label: Any
case: Any
cast: Any
cte: Any
values: Any
extract: Any
tuple_: Any
except_: Any
except_all: Any
intersect: Any
intersect_all: Any
union: Any
union_all: Any
exists: Any
nulls_first: Any
nullsfirst: Any
nulls_last: Any
nullslast: Any
asc: Any
desc: Any
distinct: Any
type_coerce: Any
true: Any
false: Any
null: Any
join: Any
outerjoin: Any
insert: Any
update: Any
delete: Any
funcfilter: Any
all_: Incomplete
any_: Incomplete
and_: Incomplete
alias: Incomplete
tablesample: Incomplete
lateral: Incomplete
or_: Incomplete
bindparam: Incomplete
select: Incomplete
text: Incomplete
table: Incomplete
column: Incomplete
over: Incomplete
within_group: Incomplete
label: Incomplete
case: Incomplete
cast: Incomplete
cte: Incomplete
values: Incomplete
extract: Incomplete
tuple_: Incomplete
except_: Incomplete
except_all: Incomplete
intersect: Incomplete
intersect_all: Incomplete
union: Incomplete
union_all: Incomplete
exists: Incomplete
nulls_first: Incomplete
nullsfirst: Incomplete
nulls_last: Incomplete
nullslast: Incomplete
asc: Incomplete
desc: Incomplete
distinct: Incomplete
type_coerce: Incomplete
true: Incomplete
false: Incomplete
null: Incomplete
join: Incomplete
outerjoin: Incomplete
insert: Incomplete
update: Incomplete
delete: Incomplete
funcfilter: Incomplete

View File

@@ -1,3 +1,4 @@
from _typeshed import Incomplete
from typing import Any
from ..util import HasMemoized
@@ -9,12 +10,12 @@ from .visitors import TraversibleType
def register_function(identifier, fn, package: str = ...) -> None: ...
class FunctionElement(Executable, ColumnElement[Any], FromClause, Generative): # type: ignore[misc]
packagenames: Any
clause_expr: Any
packagenames: Incomplete
clause_expr: Incomplete
def __init__(self, *clauses, **kwargs) -> None: ...
def scalar_table_valued(self, name, type_: Any | None = ...): ...
def scalar_table_valued(self, name, type_: Incomplete | None = ...): ...
def table_valued(self, *expr, **kw): ...
def column_valued(self, name: Any | None = ...): ...
def column_valued(self, name: str | None = ..., joins_implicitly: bool = ...): ...
@property
def columns(self): ...
@property
@@ -22,7 +23,11 @@ class FunctionElement(Executable, ColumnElement[Any], FromClause, Generative):
@HasMemoized.memoized_attribute
def clauses(self): ...
def over(
self, partition_by: Any | None = ..., order_by: Any | None = ..., rows: Any | None = ..., range_: Any | None = ...
self,
partition_by: Incomplete | None = ...,
order_by: Incomplete | None = ...,
rows: Incomplete | None = ...,
range_: Incomplete | None = ...,
): ...
def within_group(self, *order_by): ...
def filter(self, *criterion): ...
@@ -32,18 +37,18 @@ class FunctionElement(Executable, ColumnElement[Any], FromClause, Generative):
def select(self): ...
def scalar(self): ...
def execute(self): ...
def self_group(self, against: Any | None = ...): ...
def self_group(self, against: Incomplete | None = ...): ...
@property
def entity_namespace(self): ...
class FunctionAsBinary(BinaryExpression):
sql_function: Any
left_index: Any
right_index: Any
operator: Any
type: Any
negate: Any
modifiers: Any
sql_function: Incomplete
left_index: Incomplete
right_index: Incomplete
operator: Incomplete
type: Incomplete
negate: Incomplete
modifiers: Incomplete
def __init__(self, fn, left_index, right_index) -> None: ...
@property
def left(self): ...
@@ -57,45 +62,45 @@ class FunctionAsBinary(BinaryExpression):
class ScalarFunctionColumn(NamedColumn):
__visit_name__: str
is_literal: bool
table: Any
fn: Any
name: Any
type: Any
def __init__(self, fn, name, type_: Any | None = ...) -> None: ...
table: Incomplete
fn: Incomplete
name: Incomplete
type: Incomplete
def __init__(self, fn, name, type_: Incomplete | None = ...) -> None: ...
class _FunctionGenerator:
opts: Any
opts: Incomplete
def __init__(self, **opts) -> None: ...
def __getattr__(self, name: str): ...
def __call__(self, *c, **kwargs): ...
func: Any
modifier: Any
func: Incomplete
modifier: Incomplete
class Function(FunctionElement):
__visit_name__: str
type: Any
packagenames: Any
name: Any
type: Incomplete
packagenames: Incomplete
name: Incomplete
def __init__(self, name, *clauses, **kw) -> None: ...
class _GenericMeta(TraversibleType):
def __init__(cls, clsname, bases, clsdict) -> None: ...
class GenericFunction:
name: Any
identifier: Any
name: Incomplete
identifier: Incomplete
coerce_arguments: bool
inherit_cache: bool
packagenames: Any
clause_expr: Any
type: Any
packagenames: Incomplete
clause_expr: Incomplete
type: Incomplete
def __init__(self, *args, **kwargs) -> None: ...
class next_value(GenericFunction):
type: Any
type: Incomplete
name: str
sequence: Any
sequence: Incomplete
def __init__(self, seq, **kw) -> None: ...
def compare(self, other, **kw): ...
@@ -120,15 +125,15 @@ class sum(ReturnTypeFromArgs):
inherit_cache: bool
class now(GenericFunction):
type: Any
type: Incomplete
inherit_cache: bool
class concat(GenericFunction):
type: Any
type: Incomplete
inherit_cache: bool
class char_length(GenericFunction):
type: Any
type: Incomplete
inherit_cache: bool
def __init__(self, arg, **kwargs) -> None: ...
@@ -136,48 +141,48 @@ class random(GenericFunction):
inherit_cache: bool
class count(GenericFunction):
type: Any
type: Incomplete
inherit_cache: bool
def __init__(self, expression: Any | None = ..., **kwargs) -> None: ...
def __init__(self, expression: Incomplete | None = ..., **kwargs) -> None: ...
class current_date(AnsiFunction):
type: Any
type: Incomplete
inherit_cache: bool
class current_time(AnsiFunction):
type: Any
type: Incomplete
inherit_cache: bool
class current_timestamp(AnsiFunction):
type: Any
type: Incomplete
inherit_cache: bool
class current_user(AnsiFunction):
type: Any
type: Incomplete
inherit_cache: bool
class localtime(AnsiFunction):
type: Any
type: Incomplete
inherit_cache: bool
class localtimestamp(AnsiFunction):
type: Any
type: Incomplete
inherit_cache: bool
class session_user(AnsiFunction):
type: Any
type: Incomplete
inherit_cache: bool
class sysdate(AnsiFunction):
type: Any
type: Incomplete
inherit_cache: bool
class user(AnsiFunction):
type: Any
type: Incomplete
inherit_cache: bool
class array_agg(GenericFunction):
type: Any
type: Incomplete
inherit_cache: bool
def __init__(self, *args, **kwargs) -> None: ...
@@ -198,19 +203,19 @@ class percentile_disc(OrderedSetAgg):
inherit_cache: bool
class rank(GenericFunction):
type: Any
type: Incomplete
inherit_cache: bool
class dense_rank(GenericFunction):
type: Any
type: Incomplete
inherit_cache: bool
class percent_rank(GenericFunction):
type: Any
type: Incomplete
inherit_cache: bool
class cume_dist(GenericFunction):
type: Any
type: Incomplete
inherit_cache: bool
class cube(GenericFunction):

View File

@@ -1,4 +1,5 @@
from typing import Any, Generic, TypeVar
from _typeshed import Incomplete
from typing import Generic, TypeVar
from . import elements, roles
from .base import Options
@@ -9,33 +10,33 @@ _T = TypeVar("_T")
class LambdaOptions(Options):
enable_tracking: bool
track_closure_variables: bool
track_on: Any
track_on: Incomplete
global_track_bound_values: bool
track_bound_values: bool
lambda_cache: Any
lambda_cache: Incomplete
def lambda_stmt(
lmb,
enable_tracking: bool = ...,
track_closure_variables: bool = ...,
track_on: Any | None = ...,
track_on: Incomplete | None = ...,
global_track_bound_values: bool = ...,
track_bound_values: bool = ...,
lambda_cache: Any | None = ...,
lambda_cache: Incomplete | None = ...,
): ...
class LambdaElement(elements.ClauseElement):
__visit_name__: str
parent_lambda: Any
fn: Any
role: Any
tracker_key: Any
opts: Any
def __init__(self, fn, role, opts=..., apply_propagate_attrs: Any | None = ...) -> None: ...
parent_lambda: Incomplete
fn: Incomplete
role: Incomplete
tracker_key: Incomplete
opts: Incomplete
def __init__(self, fn, role, opts=..., apply_propagate_attrs: Incomplete | None = ...) -> None: ...
def __getattr__(self, key: str): ...
class DeferredLambdaElement(LambdaElement):
lambda_args: Any
lambda_args: Incomplete
def __init__(self, fn, role, opts=..., lambda_args=...) -> None: ...
class StatementLambdaElement(roles.AllowsLambdaRole, LambdaElement):
@@ -44,7 +45,7 @@ class StatementLambdaElement(roles.AllowsLambdaRole, LambdaElement):
self,
other,
enable_tracking: bool = ...,
track_on: Any | None = ...,
track_on: Incomplete | None = ...,
track_closure_variables: bool = ...,
track_bound_values: bool = ...,
): ...
@@ -58,54 +59,60 @@ class NullLambdaStatement(roles.AllowsLambdaRole, elements.ClauseElement):
def add_criteria(self, other, **kw): ...
class LinkedLambdaElement(StatementLambdaElement):
role: Any
opts: Any
fn: Any
parent_lambda: Any
tracker_key: Any
role: Incomplete
opts: Incomplete
fn: Incomplete
parent_lambda: Incomplete
tracker_key: Incomplete
def __init__(self, fn, parent_lambda, opts) -> None: ...
class AnalyzedCode:
@classmethod
def get(cls, fn, lambda_element, lambda_kw, **kw): ...
track_bound_values: Any
track_closure_variables: Any
bindparam_trackers: Any
closure_trackers: Any
build_py_wrappers: Any
track_bound_values: Incomplete
track_closure_variables: Incomplete
bindparam_trackers: Incomplete
closure_trackers: Incomplete
build_py_wrappers: Incomplete
def __init__(self, fn, lambda_element, opts) -> None: ...
class NonAnalyzedFunction:
closure_bindparams: Any
bindparam_trackers: Any
expr: Any
closure_bindparams: Incomplete
bindparam_trackers: Incomplete
expr: Incomplete
def __init__(self, expr) -> None: ...
@property
def expected_expr(self): ...
class AnalyzedFunction:
analyzed_code: Any
fn: Any
closure_pywrappers: Any
tracker_instrumented_fn: Any
expr: Any
bindparam_trackers: Any
expected_expr: Any
is_sequence: Any
propagate_attrs: Any
closure_bindparams: Any
analyzed_code: Incomplete
fn: Incomplete
closure_pywrappers: Incomplete
tracker_instrumented_fn: Incomplete
expr: Incomplete
bindparam_trackers: Incomplete
expected_expr: Incomplete
is_sequence: Incomplete
propagate_attrs: Incomplete
closure_bindparams: Incomplete
def __init__(self, analyzed_code, lambda_element, apply_propagate_attrs, fn) -> None: ...
class PyWrapper(ColumnOperators[_T], Generic[_T]):
fn: Any
track_bound_values: Any
fn: Incomplete
track_bound_values: Incomplete
def __init__(
self, fn, name, to_evaluate, closure_index: Any | None = ..., getter: Any | None = ..., track_bound_values: bool = ...
self,
fn,
name,
to_evaluate,
closure_index: Incomplete | None = ...,
getter: Incomplete | None = ...,
track_bound_values: bool = ...,
) -> None: ...
def __call__(self, *arg, **kw): ...
def operate(self, op, *other, **kwargs): ...
def reverse_operate(self, op, other, **kwargs): ...
def __clause_element__(self): ...
def __clause_element__(self): ... # Field not always present.
def __bool__(self) -> bool: ...
def __nonzero__(self) -> bool: ...
def __getattribute__(self, key: str): ...