Mark many attributes as read-only properties (#7591)

This commit is contained in:
Alex Waygood
2022-04-05 07:37:24 +01:00
committed by GitHub
parent b8f2eb3930
commit 85aec034ae
28 changed files with 189 additions and 93 deletions

View File

@@ -14,8 +14,10 @@ KEY_OBJECTS_BUT_WARN: int
KEY_OBJECTS_NO_WARN: int
class Row(BaseRow, Sequence[Any], metaclass=abc.ABCMeta):
count: Any
index: Any
@property
def count(self): ...
@property
def index(self): ...
def __contains__(self, key): ...
__hash__: Any
def __lt__(self, other): ...

View File

@@ -93,7 +93,8 @@ class _AssociationCollection:
setter: Any
parent: Any
def __init__(self, lazy_collection, creator, getter, setter, parent) -> None: ...
col: Any
@property
def col(self): ...
def __len__(self): ...
def __bool__(self): ...
__nonzero__: Any

View File

@@ -92,7 +92,8 @@ class ForeignKey(DialectKWArgs, SchemaItem):
**dialect_kw,
) -> None: ...
def copy(self, schema: Any | None = ..., **kw): ...
target_fullname: Any
@property
def target_fullname(self): ...
def references(self, table): ...
def get_referent(self, table): ...
@memoized_property

View File

@@ -70,7 +70,8 @@ class FromClause(roles.AnonymizedFromClauseRole, Selectable):
def primary_key(self): ...
@memoized_property
def foreign_keys(self): ...
c: Any
@property
def c(self): ...
LABEL_STYLE_NONE: Any
LABEL_STYLE_TABLENAME_PLUS_COL: Any
@@ -383,7 +384,8 @@ class ScalarSelect(roles.InElementRole, Generative, Grouping):
def __init__(self, element) -> None: ...
@property
def columns(self) -> None: ...
c: Any
@property
def c(self): ...
def where(self, crit) -> None: ...
def self_group(self, **kwargs): ...
def correlate(self, *fromclauses) -> None: ...