Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
samj1912 committed Aug 22, 2020
1 parent 2f6ab9e commit 0e5648c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/snippets/publicity.rst
Expand Up @@ -27,7 +27,7 @@ a class called ``_Foo`` is considered private. A method ``bar`` in ``_Foo`` is
also considered private since its parent is a private class, even though its
name does not begin with a single underscore.

Note, a construct's parent is recursively checked upward until we reach a directory
Note, a module's parent is recursively checked upward until we reach a directory
in ``sys.path`` to avoid considering the complete filepath of a module.
For example, consider the module ``/_foo/bar/baz.py``.
If ``PYTHONPATH`` is set to ``/``, then ``baz.py`` is *private*.
Expand Down
2 changes: 1 addition & 1 deletion src/pydocstyle/parser.py
Expand Up @@ -127,7 +127,7 @@ def is_public(self):

def _is_inside_private_package(self):
"""Return True if the module is inside a private package."""
path = Path(self.name).parent # Ignore the actual module's name
path = Path(self.name).parent # Ignore the actual module's name.
syspath = [Path(p) for p in sys.path] # Convert to pathlib.Path.

# Bail if we are at the root directory or in `PYTHONPATH`.
Expand Down

0 comments on commit 0e5648c

Please sign in to comment.