Skip to content

Add inline_methods config option#139

Open
bschwedler wants to merge 1 commit intoposit-dev:mainfrom
bschwedler:inline-methods-config
Open

Add inline_methods config option#139
bschwedler wants to merge 1 commit intoposit-dev:mainfrom
bschwedler:inline-methods-config

Conversation

@bschwedler
Copy link
Copy Markdown

@bschwedler bschwedler commented Apr 24, 2026

Summary

  • Add inline_methods setting to great-docs.yml to control whether class methods get their own pages or stay inline on the class page
  • Replace three hardcoded > 5 threshold checks in core.py with a single should_split_methods() method on GreatDocsConfig

Usage

# great-docs.yml
inline_methods: true    # always inline (never split)
inline_methods: false   # always split to separate pages
inline_methods: 10      # inline up to 10, split above (default: 5)

The default behavior (split above 5 methods) is unchanged.

Details

  • Non-class items (functions, constants) with 0 methods are never split regardless of setting
  • Invalid config values (e.g., null, "abc") fall back to the default threshold of 5

Control whether class methods get their own pages or stay inline
on the class page via the inline_methods setting in great-docs.yml:

  inline_methods: true   # always inline (never split)
  inline_methods: false  # always split to separate pages
  inline_methods: 10     # inline up to 10, split above (default: 5)

Replaces three hardcoded threshold = 5 checks with a single
config-driven method on GreatDocsConfig.
@bschwedler bschwedler force-pushed the inline-methods-config branch from cec94ac to 3888169 Compare April 24, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant