Skip to content

Commit b3b1025

Browse files
committed
fix: Break long line in adapt_checkpoint_hparams docstring example
- Split method signature across multiple lines to stay within 120 char limit - Improves code readability in documentation example
1 parent 00e7032 commit b3b1025

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lightning/pytorch/cli.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,9 @@ def adapt_checkpoint_hparams(self, subcommand: str, checkpoint_hparams: dict[str
579579
Example::
580580
581581
class MyCLI(LightningCLI):
582-
def adapt_checkpoint_hparams(self, subcommand: str, checkpoint_hparams: dict[str, Any]) -> dict[str, Any]:
582+
def adapt_checkpoint_hparams(
583+
self, subcommand: str, checkpoint_hparams: dict[str, Any]
584+
) -> dict[str, Any]:
583585
# Only remove training-specific hyperparameters for non-fit subcommands
584586
if subcommand != "fit":
585587
checkpoint_hparams.pop("lr", None)

0 commit comments

Comments
 (0)