* Version bump

* upate version

* fix domain name

* wrong project

* skip on Windows

* disable demo snapshot

* 37 fix
This commit is contained in:
Will McGugan
2023-04-27 15:01:46 +01:00
committed by GitHub
parent dd70a7a2dc
commit 124c45e68c
5 changed files with 152 additions and 145 deletions

View File

@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [0.22.0] - Unreleased
## [0.22.0] - 2023-04-27
### Fixed
@@ -820,6 +820,7 @@ https://textual.textualize.io/blog/2022/11/08/version-040/#version-040
- New handler system for messages that doesn't require inheritance
- Improved traceback handling
[0.22.0]: https://github.com/Textualize/textual/compare/v0.21.0...v0.22.0
[0.21.0]: https://github.com/Textualize/textual/compare/v0.20.1...v0.21.0
[0.20.1]: https://github.com/Textualize/textual/compare/v0.20.0...v0.20.1
[0.20.0]: https://github.com/Textualize/textual/compare/v0.19.1...v0.20.0

View File

@@ -1,6 +1,6 @@
[tool.poetry]
name = "textual"
version = "0.21.0"
version = "0.22.0"
homepage = "https://github.com/Textualize/textual"
description = "Modern Text User Interface framework"
authors = ["Will McGugan <will@textualize.io>"]

View File

@@ -218,9 +218,7 @@ def resolve_box_models(
# If all box models have been calculated
widget_styles = [widget.styles for widget in widgets]
if resolve_dimension == "width":
total_remaining = int(
sum([width for width, _, _ in filter(None, box_models)], start=Fraction())
)
total_remaining = int(sum([width for width, _, _ in filter(None, box_models)]))
remaining_space = int(max(0, size.width - total_remaining - margin_width))
fraction_unit = resolve_fraction_unit(
[
@@ -237,7 +235,7 @@ def resolve_box_models(
height_fraction = Fraction(margin_size.height)
else:
total_remaining = int(
sum([height for _, height, _ in filter(None, box_models)], start=Fraction())
sum([height for _, height, _ in filter(None, box_models)])
)
remaining_space = int(max(0, size.height - total_remaining - margin_height))
fraction_unit = resolve_fraction_unit(

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,5 @@
from pathlib import Path
import sys
import pytest
@@ -319,11 +320,19 @@ def test_demo(snap_compare):
"""Test the demo app (python -m textual)"""
assert snap_compare(
Path("../../src/textual/demo.py"),
press=["down", "down", "down", "wait:500"],
terminal_size=(100, 30),
)
# def test_demo_with_keys(snap_compare):
# """Test the demo app (python -m textual)"""
# assert snap_compare(
# Path("../../src/textual/demo.py"),
# press=["down", "down", "down", "wait:500"],
# terminal_size=(100, 30),
# )
def test_label_widths(snap_compare):
"""Test renderable widths are calculate correctly."""
assert snap_compare(SNAPSHOT_APPS_DIR / "label_widths.py")