Avoid unnecessary forward refs in class definitions (#10124)

This commit is contained in:
Alex Waygood
2023-05-01 15:50:50 +01:00
committed by GitHub
parent 277532219f
commit e816acffdd
5 changed files with 98 additions and 99 deletions

View File

@@ -118,9 +118,15 @@ annotated_classes: dict[Incomplete, Incomplete]
# Everything below is dynamically generated at runtime
class AnnotatedAlias(AnnotatedAliasedReturnsRows, Alias): ...
class AnnotatedFromClause(_SelectableAnnotatedFromClause, FromClause): ...
class AnnotatedAliasedReturnsRows(AnnotatedFromClause, AliasedReturnsRows): ...
class AnnotatedAlias(AnnotatedAliasedReturnsRows, Alias): ...
class AnnotatedColumnElement(_ElementsAnnotatedColumnElement, ColumnElement[_T]): ...
class AnnotatedFunctionElement(AnnotatedColumnElement[_T], FunctionElement): ... # type: ignore[misc]
class AnnotatedFunction(AnnotatedFunctionElement[_T], Function): ... # type: ignore[misc]
class AnnotatedGenericFunction(AnnotatedFunction[_T], GenericFunction): ... # type: ignore[misc]
class AnnotatedAnsiFunction(AnnotatedGenericFunction[_T], AnsiFunction): ... # type: ignore[misc]
class AnnotatedUnaryExpression(AnnotatedColumnElement[_T], UnaryExpression): ...
class AnnotatedAsBoolean(AnnotatedUnaryExpression[_T], AsBoolean): ...
class AnnotatedBinaryExpression(AnnotatedColumnElement[_T], BinaryExpression): ...
class AnnotatedBindParameter(AnnotatedColumnElement[_T], BindParameter[_T]): ...
@@ -131,25 +137,20 @@ class AnnotatedCast(AnnotatedColumnElement[_T], Cast): ...
class AnnotatedClauseList(Annotated, ClauseList): ...
class AnnotatedCollationClause(AnnotatedColumnElement[_T], CollationClause): ...
class AnnotatedCollectionAggregate(AnnotatedUnaryExpression[_T], CollectionAggregate): ...
class AnnotatedColumn(AnnotatedColumnClause[_T], Column): ...
class AnnotatedNamedColumn(AnnotatedColumnElement[_T], NamedColumn): ...
class AnnotatedColumnClause(AnnotatedNamedColumn[_T], ColumnClause): ...
class AnnotatedColumnElement(_ElementsAnnotatedColumnElement, ColumnElement[_T]): ...
class AnnotatedColumn(AnnotatedColumnClause[_T], Column): ...
class AnnotatedExists(AnnotatedUnaryExpression[_T], Exists): ...
class AnnotatedExtract(AnnotatedColumnElement[_T], Extract): ...
class AnnotatedFalse_(AnnotatedColumnElement[_T], False_): ...
class AnnotatedFromClause(_SelectableAnnotatedFromClause, FromClause): ...
class AnnotatedFromGrouping(AnnotatedFromClause, FromGrouping): ...
class AnnotatedFunction(AnnotatedFunctionElement[_T], Function): ... # type: ignore[misc]
class AnnotatedFunctionAsBinary(AnnotatedBinaryExpression[_T], FunctionAsBinary): ...
class AnnotatedFunctionElement(AnnotatedColumnElement[_T], FunctionElement): ... # type: ignore[misc]
class AnnotatedFunctionFilter(AnnotatedColumnElement[_T], FunctionFilter): ...
class AnnotatedGenericFunction(AnnotatedFunction[_T], GenericFunction): ... # type: ignore[misc]
class AnnotatedGrouping(AnnotatedColumnElement[_T], Grouping): ...
class AnnotatedIndexExpression(AnnotatedBinaryExpression[_T], IndexExpression): ...
class AnnotatedJoin(AnnotatedFromClause, Join): ...
class AnnotatedLabel(AnnotatedColumnElement[_T], Label): ...
class AnnotatedLateral(AnnotatedAliasedReturnsRows, Lateral): ...
class AnnotatedNamedColumn(AnnotatedColumnElement[_T], NamedColumn): ...
class AnnotatedNull(AnnotatedColumnElement[_T], Null): ...
class AnnotatedOrderedSetAgg(AnnotatedGenericFunction[_T], OrderedSetAgg): ... # type: ignore[misc]
class AnnotatedOver(AnnotatedColumnElement[_T], Over): ...
@@ -158,15 +159,14 @@ class AnnotatedScalarFunctionColumn(AnnotatedNamedColumn[_T], ScalarFunctionColu
class AnnotatedScalarSelect(AnnotatedGrouping[_T], ScalarSelect): ...
class AnnotatedSlice(AnnotatedColumnElement[_T], Slice): ...
class AnnotatedSubquery(AnnotatedAliasedReturnsRows, Subquery): ...
class AnnotatedTable(AnnotatedTableClause, Table): ...
class AnnotatedTableClause(AnnotatedFromClause, TableClause): ...
class AnnotatedTable(AnnotatedTableClause, Table): ...
class AnnotatedTableSample(AnnotatedAliasedReturnsRows, TableSample): ...
class AnnotatedTableValuedAlias(AnnotatedAlias, TableValuedAlias): ...
class AnnotatedTableValuedColumn(AnnotatedNamedColumn[_T], TableValuedColumn): ...
class AnnotatedTrue_(AnnotatedColumnElement[_T], True_): ...
class AnnotatedTuple(AnnotatedColumnElement[_T], Tuple): ...
class AnnotatedTypeCoerce(AnnotatedColumnElement[_T], TypeCoerce): ...
class AnnotatedUnaryExpression(AnnotatedColumnElement[_T], UnaryExpression): ...
class AnnotatedValues(AnnotatedFromClause, Values): ...
class AnnotatedWithinGroup(AnnotatedColumnElement[_T], WithinGroup): ...
class Annotated_CompileLabel(AnnotatedColumnElement[_T], _CompileLabel): ...