From 23e34a2de82b73ac8e0a75dd78af53c7450d5c29 Mon Sep 17 00:00:00 2001 From: "Michael J. Sullivan" Date: Wed, 3 Apr 2019 12:18:46 -0700 Subject: [PATCH 1/2] Add some more plugin docs * Link to plugin changes announcement issue (#6617) * Document get_additional_deps() --- docs/source/extending_mypy.rst | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/source/extending_mypy.rst b/docs/source/extending_mypy.rst index d2ad80abc48ed..df235bff823ad 100644 --- a/docs/source/extending_mypy.rst +++ b/docs/source/extending_mypy.rst @@ -59,8 +59,11 @@ new first class kinds of types. The plugin system is experimental and prone to change. If you want to write a mypy plugin, we recommend you start by contacting the mypy core developers on `gitter `_. In particular, there are - no guarantees about backwards compatibility. Backwards incompatible changes - may be made without a deprecation period. + no guarantees about backwards compatibility. + + Backwards incompatible changes may be made without a deprecation period, + but we will attempt to announce them in + `the plugin API changes announcement issue `_. Configuring mypy to use plugins ******************************* @@ -227,3 +230,8 @@ method resolution order, etc.) **get_customize_class_mro_hook()** can be used to modify class MRO (for example insert some entries there) before the class body is analyzed. + +**get_additional_deps()** can be used to add new dependencies for a +module. It is called before semantic analysis. For example, this can +be used if a library has dependencies that are dynamically loaded +based on configuration information. From e111fa1931d7a91c94258b9ffe8ac7918efa980e Mon Sep 17 00:00:00 2001 From: "Michael J. Sullivan" Date: Fri, 5 Apr 2019 16:13:44 -0700 Subject: [PATCH 2/2] Update extending_mypy.rst --- docs/source/extending_mypy.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/extending_mypy.rst b/docs/source/extending_mypy.rst index df235bff823ad..f524af847212d 100644 --- a/docs/source/extending_mypy.rst +++ b/docs/source/extending_mypy.rst @@ -62,7 +62,7 @@ new first class kinds of types. no guarantees about backwards compatibility. Backwards incompatible changes may be made without a deprecation period, - but we will attempt to announce them in + but we will announce them in `the plugin API changes announcement issue `_. Configuring mypy to use plugins