summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorCarl Meyer <carl@oddbird.net>2017-10-23 16:49:09 -0700
committerCarl Meyer <carl@oddbird.net>2017-10-24 19:58:18 -0700
commit423980164b258b2ec77d8d9bfccb9bc00b220e31 (patch)
tree95c9cd2ad1955478ddc317136fb63dc7636142fc /docs
parent8acf55e0f85233c51c291816d73d828cc62d30d1 (diff)
downloadflake8-423980164b258b2ec77d8d9bfccb9bc00b220e31.tar.gz
Add paths option in local-plugins config file.
Diffstat (limited to 'docs')
-rw-r--r--docs/source/user/configuration.rst21
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/source/user/configuration.rst b/docs/source/user/configuration.rst
index eacacef..b036eff 100644
--- a/docs/source/user/configuration.rst
+++ b/docs/source/user/configuration.rst
@@ -267,6 +267,27 @@ example:
These configurations will allow you to select your own custom reporter plugin
that you've designed or will utilize your new check classes.
+If your package is installed in the same virtualenv that |Flake8| will run
+from, and your local plugins are part of that package, you're all set; |Flake8|
+will be able to import your local plugins. However, if you are working on a
+project that isn't set up as an installable package, or |Flake8| doesn't run
+from the same virtualenv your code runs in, you may need to tell |Flake8| where
+to import your local plugins from. You can do this via the ``paths`` option in
+the ``local-plugins`` section of your config:
+
+.. code-block:: ini
+
+ [flake8:local-plugins]
+ extension =
+ MC1 = myflake8plugin:MyChecker1
+ paths =
+ ./path/to
+
+Relative paths will be interpreted relative to the config file. Multiple paths
+can be listed, one per line (or comma separated) as needed. If your local
+plugins have any dependencies, it's up to you to ensure they are installed in
+whatever Python environment |Flake8| runs in.
+
.. note::
These plugins otherwise follow the same guidelines as regular plugins.