From 56b554dd9ca32f43565e7bfb0e3558432da36e4a Mon Sep 17 00:00:00 2001 From: Vaughn Kottler Date: Sat, 3 Feb 2024 15:03:10 -0600 Subject: [PATCH] 1.3.2 - Fix breakage --- .github/workflows/python-package.yml | 2 +- README.md | 4 ++-- conntextual/__init__.py | 4 ++-- conntextual/ui/channel/environment.py | 6 +----- conntextual/ui/channel/log.py | 3 ++- conntextual/util.py | 8 ++++++++ local/variables/package.yaml | 2 +- pyproject.toml | 2 +- 8 files changed, 18 insertions(+), 13 deletions(-) create mode 100644 conntextual/util.py diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 2d0a12e..143bfbe 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -67,7 +67,7 @@ jobs: - run: | mk python-release owner=vkottler \ - repo=conntextual version=1.3.1 + repo=conntextual version=1.3.2 if: | matrix.python-version == '3.11' && matrix.system == 'ubuntu-latest' diff --git a/README.md b/README.md index fe26cf4..3a67ac1 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ ===================================== generator=datazen version=3.1.4 - hash=3345fdf7fe9724212ccd25326d68100f + hash=a9a30cf429a319b9952628f5e462ff40 ===================================== --> -# conntextual ([1.3.1](https://pypi.org/project/conntextual/)) +# conntextual ([1.3.2](https://pypi.org/project/conntextual/)) [![python](https://img.shields.io/pypi/pyversions/conntextual.svg)](https://pypi.org/project/conntextual/) ![Build Status](https://github.com/vkottler/conntextual/workflows/Python%20Package/badge.svg) diff --git a/conntextual/__init__.py b/conntextual/__init__.py index e59f195..80bbe4a 100644 --- a/conntextual/__init__.py +++ b/conntextual/__init__.py @@ -1,7 +1,7 @@ # ===================================== # generator=datazen # version=3.1.4 -# hash=e28998387d41495187b30a46237285db +# hash=5a5bf6bcbb4a7b41af6399988074b404 # ===================================== """ @@ -10,4 +10,4 @@ DESCRIPTION = "A network-application TUI using textual." PKG_NAME = "conntextual" -VERSION = "1.3.1" +VERSION = "1.3.2" diff --git a/conntextual/ui/channel/environment.py b/conntextual/ui/channel/environment.py index db43e0c..366e061 100644 --- a/conntextual/ui/channel/environment.py +++ b/conntextual/ui/channel/environment.py @@ -29,6 +29,7 @@ from conntextual.ui.channel.plot import Plot from conntextual.ui.channel.selected import SelectedChannel from conntextual.ui.channel.suggester import CommandSuggester +from conntextual.util import css_name __all__ = ["ChannelEnvironmentDisplay"] COLUMNS = ["type", "name", "value"] @@ -36,11 +37,6 @@ STALE_THRESHOLD_NS = to_nanos(0.5) -def css_name(name: str) -> str: - """Replace some characters that don't work in identifier values.""" - return name.replace(".", "_") - - class ChannelEnvironmentDisplay(Static): """A channel-environment interface element.""" diff --git a/conntextual/ui/channel/log.py b/conntextual/ui/channel/log.py index aa68555..0016f73 100644 --- a/conntextual/ui/channel/log.py +++ b/conntextual/ui/channel/log.py @@ -20,6 +20,7 @@ # internal from conntextual.ui.channel.suggester import CommandSuggester +from conntextual.util import css_name MAX_LINES = 1000 @@ -86,7 +87,7 @@ def compose(self) -> ComposeResult: "set ", classes="command_input", suggester=self.suggester, - id=f"{self.parent_name}-input", + id=f"{css_name(self.parent_name)}-input", ) input_box.previous = "" yield input_box diff --git a/conntextual/util.py b/conntextual/util.py new file mode 100644 index 0000000..226fb27 --- /dev/null +++ b/conntextual/util.py @@ -0,0 +1,8 @@ +""" +A module containing miscellaneous. +""" + + +def css_name(name: str) -> str: + """Replace some characters that don't work in identifier values.""" + return name.replace(".", "_") diff --git a/local/variables/package.yaml b/local/variables/package.yaml index 786510d..2cfdb96 100644 --- a/local/variables/package.yaml +++ b/local/variables/package.yaml @@ -1,5 +1,5 @@ --- major: 1 minor: 3 -patch: 1 +patch: 2 entry: conntextual diff --git a/pyproject.toml b/pyproject.toml index 0074884..aa670ee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta:__legacy__" [project] name = "conntextual" -version = "1.3.1" +version = "1.3.2" description = "A network-application TUI using textual." readme = "README.md" requires-python = ">=3.11"