summaryrefslogtreecommitdiff
path: root/doc/user_guide
diff options
context:
space:
mode:
authorAlexey Pelykh <alexey.pelykh@gmail.com>2023-02-09 20:16:02 +0100
committerGitHub <noreply@github.com>2023-02-09 20:16:02 +0100
commit71b6325c8499c8a66e90d90e88c75d7c7ab13b23 (patch)
tree5469f59cc6762feef6721f57f71d84f56ed81bb2 /doc/user_guide
parent70e2178dcaecdc4e90ac1cb45e06be261bd1e03b (diff)
downloadpylint-git-71b6325c8499c8a66e90d90e88c75d7c7ab13b23.tar.gz
Support Implicit Namespace Packages (PEP 420) (#8153)
Co-authored-by: Andreas Finkler <3929834+DudeNr33@users.noreply.github.com>
Diffstat (limited to 'doc/user_guide')
-rw-r--r--doc/user_guide/configuration/all-options.rst7
-rw-r--r--doc/user_guide/usage/run.rst7
2 files changed, 14 insertions, 0 deletions
diff --git a/doc/user_guide/configuration/all-options.rst b/doc/user_guide/configuration/all-options.rst
index d8df0ac1d..ff5e942b8 100644
--- a/doc/user_guide/configuration/all-options.rst
+++ b/doc/user_guide/configuration/all-options.rst
@@ -174,6 +174,13 @@ Standard Checkers
**Default:** ``(3, 10)``
+--source-roots
+""""""""""""""
+*Add paths to the list of the source roots. The source root is an absolute path or a path relative to the current working directory used to determine a package namespace for modules located under the source root.*
+
+**Default:** ``()``
+
+
--recursive
"""""""""""
*Discover python modules and packages in the file system subtree.*
diff --git a/doc/user_guide/usage/run.rst b/doc/user_guide/usage/run.rst
index 84e1a8e2f..cee6f362f 100644
--- a/doc/user_guide/usage/run.rst
+++ b/doc/user_guide/usage/run.rst
@@ -45,6 +45,13 @@ directory is automatically added on top of the python path
package (i.e. has an ``__init__.py`` file), an implicit namespace package
or if ``directory`` is in the python path.
+With implicit namespace packages
+--------------------------------
+
+If the analyzed sources use implicit namespace packages (PEP 420), the source root(s) should
+be specified using the ``--source-roots`` option. Otherwise, the package names are
+detected incorrectly, since implicit namespace packages don't contain an ``__init__.py``.
+
Command line options
--------------------