Skip to content

WARNING: Field list ends without a blank line; unexpected unindent #305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rra opened this issue Jan 20, 2023 · 2 comments · Fixed by #307
Closed

WARNING: Field list ends without a blank line; unexpected unindent #305

rra opened this issue Jan 20, 2023 · 2 comments · Fixed by #307
Labels

Comments

@rra
Copy link

rra commented Jan 20, 2023

The WARNING: Field list ends without a blank line; unexpected unindent has returned in 1.21.5. I suspect this is another variation on the problem reported and fixed in #293.

GitHub Actions log showing this failure: https://github.com/lsst-sqre/safir/actions/runs/3963428111/jobs/6791355176

Example docstring that produces the first error message there:

    """Run the decorated function with `asyncio.run`.

    Intended to be used as a decorator around an async function that needs to
    be run in a sync context.  The decorated function will be run with
    `asyncio.run` when invoked.  The caller must not already be inside an
    asyncio task.

    Parameters
    ----------
    f
        The function to wrap.

    Examples
    --------
    An application that uses Safir and `Click`_ may use the following Click
    command function to initialize a database.

    .. code-block:: python

       import structlog
       from safir.asyncio import run_with_asyncio
       from safir.database import initialize_database

       from .config import config
       from .schema import Base


       @main.command()
       @run_with_asyncio
       async def init() -> None:
           logger = structlog.get_logger(config.safir.logger_name)
           engine = await initialize_database(
               config.database_url,
               config.database_password,
               logger,
               schema=Base.metadata,
           )
           await engine.dispose()
    """

Removing the Parameters section makes the warning go away. The same docstring (and the others in this package) worked correctly with 1.21.1.

@gaborbernat
Copy link
Member

cc @hoodmane

@hoodmane
Copy link
Collaborator

hoodmane commented Jan 20, 2023

Convenient that we have people willing to give us more test cases. I think we should refactor the test suite a bit first though: test_sphinx_output is getting a little unmanageable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants