We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQLAlchemy supports automatic type detection with foreign key columns:
class MyModel(Model): my_column = Column(None, ForeignKey('other_table.other_column'))
However this call variant is not present in the stubs. Mypy says:
error: No overload variant of "Column" matches argument types "None", "ForeignKey" [call-overload] note: Possible overload variants: note: def [_T] __init__(self, name: str, type_: Type[TypeEngine[_T]], *args: Any, autoincrement: Union[bool, str] = ..., default: Any = ..., doc: str = ..., key: str = ..., index: bool = ..., info: Mapping[str, Any] = ..., nullable: bool = ..., onupdate: Any = ..., primary_key: bool = ..., server_default: Any = ..., server_onupdate: Union[FetchedValue, FunctionElement[Any]] = ..., quote: Optional[bool] = ..., unique: bool = ..., system: bool = ..., comment: str = ...) -> Column[_T] note: def [_T] __init__(self, name: str, type_: TypeEngine[_T], *args: Any, autoincrement: Union[bool, str] = ..., default: Any = ..., doc: str = ..., key: str = ..., index: bool = ..., info: Mapping[str, Any] = ..., nullable: bool = ..., onupdate: Any = ..., primary_key: bool = ..., server_default: Any = ..., server_onupdate: Union[FetchedValue, FunctionElement[Any]] = ..., quote: Optional[bool] = ..., unique: bool = ..., system: bool = ..., comment: str = ...) -> Column[_T] note: <4 more similar overloads not shown, out of 6 total overloads>
This issue is distinct from #67 (Can't use ForeignKey in Column).
The text was updated successfully, but these errors were encountered:
No branches or pull requests
SQLAlchemy supports automatic type detection with foreign key columns:
However this call variant is not present in the stubs. Mypy says:
This issue is distinct from #67 (Can't use ForeignKey in Column).
The text was updated successfully, but these errors were encountered: