← GDG /

#293 gdtest_inline_always

#293 gdtest_inline_always OK CONFIG
Tests inline_methods: true (always inline, never split)
Tests inline_methods: true which forces all class methods to stay inline on the class page regardless of method count. LargeAPI with 8 methods stays inline instead of being split.
View Site → Build Log ๐Ÿงช Test Coverage

Build Mode

● Has great-docs.yml

This package ships a pre-supplied config. The great-docs init step is skipped and great-docs build uses the spec-defined configuration directly. Tests specific config options and their rendered output.

Dimensions

K55
K55inline_methods: true (never split)config

Source Files

๐Ÿ“ gdtest_inline_always/
๐Ÿ“„ __init__.py
"""Package testing inline_methods: true (never split)."""

__version__ = "0.1.0"
__all__ = ["LargeAPI", "create_api"]


class LargeAPI:
    """
    A class with many methods that would normally be split.

    With inline_methods: true, all methods stay on the class page
    regardless of count.

    Parameters
    ----------
    base_url
        The API base URL.
    """

    def __init__(self, base_url: str):
        self.base_url = base_url

    def get(self, endpoint: str) -> dict:
        """
        Perform a GET request.

        Parameters
        ----------
        endpoint
            The API endpoint path.

        Returns
        -------
        dict
            Response data.
        """
        return {}

    def post(self, endpoint: str, data: dict) -> dict:
        """
        Perform a POST request.

        Parameters
        ----------
        endpoint
            The API endpoint path.
        data
            Request body payload.

        Returns
        -------
        dict
            Response data.
        """
        return {}

    def put(self, endpoint: str, data: dict) -> dict:
        """
        Perform a PUT request.

        Parameters
        ----------
        endpoint
            The API endpoint path.
        data
            Request body payload.

        Returns
        -------
        dict
            Response data.
        """
        return {}

    def delete(self, endpoint: str) -> bool:
        """
        Perform a DELETE request.

        Parameters
        ----------
        endpoint
            The API endpoint path.

        Returns
        -------
        bool
            True if deletion was successful.
        """
        return True

    def patch(self, endpoint: str, data: dict) -> dict:
        """
        Perform a PATCH request.

        Parameters
        ----------
        endpoint
            The API endpoint path.
        data
            Partial update payload.

        Returns
        -------
        dict
            Response data.
        """
        return {}

    def head(self, endpoint: str) -> dict:
        """
        Perform a HEAD request.

        Parameters
        ----------
        endpoint
            The API endpoint path.

        Returns
        -------
        dict
            Response headers.
        """
        return {}

    def options(self, endpoint: str) -> list:
        """
        Perform an OPTIONS request.

        Parameters
        ----------
        endpoint
            The API endpoint path.

        Returns
        -------
        list
            Allowed methods.
        """
        return []

    def authenticate(self, token: str) -> None:
        """
        Set authentication token.

        Parameters
        ----------
        token
            Bearer token for authentication.
        """
        pass


def create_api(url: str) -> LargeAPI:
    """
    Create a new API client.

    Parameters
    ----------
    url
        Base URL for the API.

    Returns
    -------
    LargeAPI
        Configured API client instance.
    """
    return LargeAPI(url)
๐Ÿ“„ README.md
# gdtest-inline-always

Package testing `inline_methods: true`. LargeAPI has 8 methods but
they all stay inline on the class page (no separate method pages).
๐Ÿ“„ great-docs.yml
inline_methods: true