pdoc3 / pdoc3/pdoc

HTTP Server doesn't detect changes if __all__ is used

Open
#264 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted 🤷
Dominant language
Python
Stars
1.2k
Forks
146
PR merge metrics
No merged PRs in 30d

Description

Expected Behavior

I expect changes to be reflected when using the web server when I make changes to files, even though I use __all__ and view the module.

Actual Behavior

Changes are not reflected.

Steps to Reproduce
  1. Create folder my_module

  2. Add two files

#### __init__.py

from .file1 import my_func

__all__ = ['my_func',]
#### file1.py

def my_func(x: int):
    """

    Parameters
    ----------
    x : int
        This is a number

    Returns
    -------
    int
        Same as input

    """
    return x
  1. Run pdoc --http localhost:1234 my_module from parent dir.

  2. Go to localhost:1234/my_module

  3. Change file1-py to:

#### file1.py

def my_func(x: int):
    """

    Parameters
    ----------
    x : int
        This is a number

    Returns
    -------
    int
        Very different output

    """
    return x
  1. Notice no change on the web page
Additional info
  • pdoc version: 0.9.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with pdoc --http localhost:1234 my_module using the shown __all__ and file1.py setup, then inspect the HTTP server's reload path. Change the docstring and verify that the my_module page reflects the updated return description.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.