diff options
| author | Ian Stapleton Cordasco <graffatcolmingov@gmail.com> | 2017-11-26 18:40:04 +0000 |
|---|---|---|
| committer | Ian Stapleton Cordasco <graffatcolmingov@gmail.com> | 2017-11-26 18:40:04 +0000 |
| commit | 3530870679ddb93ade9326d9e5d932596b66e8b9 (patch) | |
| tree | 02679c85d7963567ba206ef9a0d606d7cf8c7d79 /docs/source | |
| parent | dc7012cadcac5d708ac5fc307f4f3effc95a483e (diff) | |
| parent | dd1e9d1cb7e9a232946c06aca1564d48d4d6f65e (diff) | |
| download | flake8-3530870679ddb93ade9326d9e5d932596b66e8b9.tar.gz | |
Merge branch 'local-plugin-paths' into 'master'
Add paths option in local-plugins config file.
Closes #379
See merge request pycqa/flake8!211
Diffstat (limited to 'docs/source')
| -rw-r--r-- | docs/source/user/configuration.rst | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/source/user/configuration.rst b/docs/source/user/configuration.rst index eacacef..e6b3de8 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 (comma separated just like ``exclude``) 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. |
