From 397b79c4abeaae12534039f6120feca44e425419 Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Tue, 7 Nov 2023 12:19:21 +0000 Subject: [PATCH 1/2] Add parameters missing from Panel.fit --- rich/panel.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rich/panel.py b/rich/panel.py index d522d80b5..95f4c84cf 100644 --- a/rich/panel.py +++ b/rich/panel.py @@ -82,7 +82,9 @@ def fit( style: StyleType = "none", border_style: StyleType = "none", width: Optional[int] = None, + height: Optional[int] = None, padding: PaddingDimensions = (0, 1), + highlight: bool = False, ) -> "Panel": """An alternative constructor that sets expand=False.""" return cls( @@ -96,7 +98,9 @@ def fit( style=style, border_style=border_style, width=width, + height=height, padding=padding, + highlight=highlight, expand=False, ) From a31eefde90670fd9c35197e53043157581beb4ea Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Tue, 7 Nov 2023 12:22:21 +0000 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1113f8617..f68d33c02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Added + +- Adds missing parameters to Panel.fit https://github.com/Textualize/rich/issues/3142 + ## [13.6.0] - 2023-09-30 ### Added