summaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2021-02-16 18:36:50 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2021-03-13 19:01:41 -0500
commit5f8ee3920066c0cbe5d6d6b0ceb987524f7542c4 (patch)
treeef0f08f0d88a8e9e038deaf5b15db910120e8813 /tox.ini
parent76b33bb435f1f55111cd68cde9b7cb735c748bcd (diff)
downloadsqlalchemy-5f8ee3920066c0cbe5d6d6b0ceb987524f7542c4.tar.gz
Implement Mypy plugin
Rudimentary and experimental support for Mypy has been added in the form of a new plugin, which itself depends on new typing stubs for SQLAlchemy. The plugin allows declarative mappings in their standard form to both be compatible with Mypy as well as to provide typing support for mapped classes and instances. Fixes: #4609 Change-Id: Ia035978c02ad3a5c0e5b3c6c30044dd5a3155170
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini13
1 files changed, 13 insertions, 0 deletions
diff --git a/tox.ini b/tox.ini
index d57b95431..966048877 100644
--- a/tox.ini
+++ b/tox.ini
@@ -113,6 +113,19 @@ commands=
{env:BASECOMMAND} {env:WORKERS} {env:SQLITE:} {env:POSTGRESQL:} {env:EXTRA_PG_DRIVERS:} {env:MYSQL:} {env:EXTRA_MYSQL_DRIVERS:} {env:ORACLE:} {env:MSSQL:} {env:BACKENDONLY:} {env:IDENTS:} {env:MEMUSAGE:} {env:COVERAGE:} {posargs}
oracle,mssql,sqlite_file: python reap_dbs.py db_idents.txt
+
+[testenv:mypy]
+deps=
+ pytest>=6.2; python_version >= '3'
+ pytest-xdist
+ greenlet != 0.4.17
+ mock; python_version < '3.3'
+ importlib_metadata; python_version < '3.8'
+ mypy
+ git+https://github.com/sqlalchemy/sqlalchemy2-stubs
+commands =
+ pytest test/ext/mypy/test_mypy_plugin_py3k.py {posargs}
+
# thanks to https://julien.danjou.info/the-best-flake8-extensions/
[testenv:pep8]
basepython = python3