Skip to content

Commit

Permalink
update for incompatible change in textual 0.18
Browse files Browse the repository at this point in the history
  • Loading branch information
jepler committed Apr 4, 2023
1 parent 4caa85d commit d94eb73
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ repos:
rev: v2.17.0
hooks:
- id: pylint
additional_dependencies: [click,dataclasses_json,httpx,lorem-text,textual,websockets]
additional_dependencies: [click,dataclasses_json,httpx,lorem-text,'textual>=0.18.0',websockets]
args: ['--source-roots', 'src']
- repo: https://github.com/pycqa/isort
rev: 5.12.0
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies = [
"httpx",
"lorem-text",
"platformdirs",
"textual",
"textual>=0.18.0",
"websockets",
]
classifiers = [
Expand Down
4 changes: 2 additions & 2 deletions src/chap/commands/tui.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ async def on_input_submitted(self, event) -> None:
async def render_fun():
while await update.get():
if tokens:
await output.update("".join(tokens).strip())
output.update("".join(tokens).strip())
self.container.scroll_end()
await asyncio.sleep(0.1)

Expand All @@ -99,7 +99,7 @@ async def get_token_fun():
self.input.value = ""
finally:
all_output = self.session.session[-1].content
await output.update(all_output)
output.update(all_output)
output._markdown = all_output # pylint: disable=protected-access
self.container.scroll_end()
self.input.disabled = False
Expand Down

0 comments on commit d94eb73

Please sign in to comment.