]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Add type stubs link to the docs
authorIvan Levkivskyi <ilevkivskyi@dropbox.com>
Fri, 8 Feb 2019 19:10:19 +0000 (19:10 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 8 Feb 2019 19:47:02 +0000 (14:47 -0500)
Moved by Mike to be a sidebar in the Declarative docs, as
the plugin appears to be specific to Declarative.  These docs will
eventually be moved out of the "extension" section and merged
into the primary narrative documentation.

Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: Idba4c13ffc920b1140b5e51d206ab02f19015e8e

doc/build/core/type_basics.rst
doc/build/orm/extensions/declarative/basic_use.rst

index bf9cad06489f20e96ab2ec623bf46e57c91f0812..da73047244175bd9a19b5bdd3312555498b35e19 100644 (file)
@@ -18,7 +18,6 @@ the database driver returns an incorrect type.
   ...               Column('login', String(32))
   ...              )
 
-
 SQLAlchemy will use the ``Integer`` and ``String(32)`` type
 information when issuing a ``CREATE TABLE`` statement and will use it
 again when reading back rows ``SELECTed`` from the database.
index 63ab932c155f2c21b3f087a1c3b82aea28419981..02f64b064591403cd7a360ac2a6c31c6d6ad8eac 100644 (file)
@@ -70,6 +70,15 @@ added to the underlying :class:`.Table` and
 Classes which are constructed using declarative can interact freely
 with classes that are mapped explicitly with :func:`.mapper`.
 
+
+.. sidebar:: Using MyPy with SQLAlchemy models
+
+    If you are using PEP 484 static type checkers for Python, a `MyPy <http://mypy-lang.org/>`_
+    plugin is included with
+    `type stubs for SQLAlchemy <https://github.com/dropbox/sqlalchemy-stubs>`_.  The plugin
+    is tailored towards SQLAlchemy declarative models.
+
+
 It is recommended, though not required, that all tables
 share the same underlying :class:`~sqlalchemy.schema.MetaData` object,
 so that string-configured :class:`~sqlalchemy.schema.ForeignKey`