diff options
author | Alexey Pelykh <alexey.pelykh@gmail.com> | 2023-02-09 20:16:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-09 20:16:02 +0100 |
commit | 71b6325c8499c8a66e90d90e88c75d7c7ab13b23 (patch) | |
tree | 5469f59cc6762feef6721f57f71d84f56ed81bb2 /doc/user_guide | |
parent | 70e2178dcaecdc4e90ac1cb45e06be261bd1e03b (diff) | |
download | pylint-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.rst | 7 | ||||
-rw-r--r-- | doc/user_guide/usage/run.rst | 7 |
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 -------------------- |