Title: SQLAlchemy stubs produce errors with basic/typical usage · Issue #974 · python/typeshed · GitHub
Open Graph Title: SQLAlchemy stubs produce errors with basic/typical usage · Issue #974 · python/typeshed
X Title: SQLAlchemy stubs produce errors with basic/typical usage · Issue #974 · python/typeshed
Description: Originally posted on the mypy repo, copying my example over to here. Here's an example of a really straightforward usage of SQLAlchemy (almost straight out of the beginning of the ORM tutorial) that's now producing mypy errors: from sqla...
Open Graph Description: Originally posted on the mypy repo, copying my example over to here. Here's an example of a really straightforward usage of SQLAlchemy (almost straight out of the beginning of the ORM tutorial) tha...
X Description: Originally posted on the mypy repo, copying my example over to here. Here's an example of a really straightforward usage of SQLAlchemy (almost straight out of the beginning of the ORM tutorial)...
Opengraph URL: https://github.com/python/typeshed/issues/974
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"SQLAlchemy stubs produce errors with basic/typical usage","articleBody":"*[Originally posted on the mypy repo](https://github.com/python/mypy/issues/2971), copying my example over to here.*\r\n\r\nHere's an example of a really straightforward usage of SQLAlchemy (almost straight out of the beginning of [the ORM tutorial](http://docs.sqlalchemy.org/en/latest/orm/tutorial.html)) that's now producing mypy errors:\r\n\r\n```\r\nfrom sqlalchemy import Column, String\r\nfrom sqlalchemy.ext.declarative import declarative_base\r\n\r\nBase = declarative_base()\r\n\r\nclass User(Base):\r\n __tablename__ = 'users'\r\n\r\n name = Column(String)\r\n\r\n def __init__(self, name: str) -> None:\r\n self.name = name\r\n```\r\n\r\nThe error is:\r\n\r\n error: Incompatible types in assignment (expression has type \"Column\", variable has type \"str\")\r\n\r\nSo it seems like the stubs aren't setting up `Column` types as compatible with the basic types, which produces errors whenever they're assigned to, used as arguments to functions, etc.\r\n\r\nMentioning @WouldYouKindly since he did the major update in https://github.com/python/typeshed/pull/857.","author":{"url":"https://github.com/Deimos","@type":"Person","name":"Deimos"},"datePublished":"2017-03-07T02:14:44Z","url":"https://github.com/python/typeshed/issues/974"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d36b2b99-1ae2-0ea7-25e4-b44df033ac7a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C858:1A7566:F7B1EC:14CD8A5:6B005BB9 |
| html-safe-nonce | 8d6d8fed8c1ddc36096b080757f014ab4901e0c8584a283d5603185b84a7cc45 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDODU4OjFBNzU2NjpGN0IxRUM6MTRDRDhBNTo2QjAwNUJCOSIsInZpc2l0b3JfaWQiOiIxNTk4ODg4MzMxNzc1NTk3NDk3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 43dd9628aee02d79dc4e6ef0b57c657fe33a32ca024597dd4b6c1a24afaa55da |
| hovercard-subject-tag | issue:212309969 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/typeshed/974/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c2b28a67a8c1d5659901d0b846509ae8f4b6ca131bc53f71e5e8159b7d6047fe/python/typeshed/issues/974 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c2b28a67a8c1d5659901d0b846509ae8f4b6ca131bc53f71e5e8159b7d6047fe/python/typeshed/issues/974 |
| og:image:alt | Originally posted on the mypy repo, copying my example over to here. Here's an example of a really straightforward usage of SQLAlchemy (almost straight out of the beginning of the ORM tutorial) tha... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Deimos |
| hostname | github.com |
| expected-hostname | github.com |
| None | 29be975efff6507a5d135de9c7d634cf7ff8f0c55222a64386ab3202209aaf73 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/typeshed git https://github.com/python/typeshed.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 31696383 |
| octolytics-dimension-repository_nwo | python/typeshed |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31696383 |
| octolytics-dimension-repository_network_root_nwo | python/typeshed |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | eacd927ba6112e3b01ba99c762bd699a4a4f5df7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width