Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

textual.app.RenderResult is being flagged as an invalid type #5275

Closed
davep opened this issue Nov 23, 2024 · 2 comments · Fixed by #5277
Closed

textual.app.RenderResult is being flagged as an invalid type #5275

davep opened this issue Nov 23, 2024 · 2 comments · Fixed by #5277

Comments

@davep
Copy link
Contributor

davep commented Nov 23, 2024

With Textual 0.86.3 at least mypy and upright are reporting textual.app.RenderResult as being an invalid type. For example:

Screenshot 2024-11-23 at 17 11 19

is flagged via pyright, and while type checking an application of mine mypy complains:

rye run mypy --scripts-are-modules --strict src/
src/quizzical/app/widgets/logo.py:38: error: Variable "textual.app.RenderResult" is not valid as a type  [valid-type]
src/quizzical/app/widgets/logo.py:38: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
src/quizzical/app/widgets/question_counts.py:68: error: Variable "textual.app.RenderResult" is not valid as a type  [valid-type]
src/quizzical/app/widgets/question_counts.py:68: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
Found 2 errors in 2 files (checked 25 source files)
make: *** [stricttypecheck] Error 1

Textual Diagnostics

Versions

Name Value
Textual 0.86.3
Rich 13.9.4

Python

Name Value
Version 3.12.4
Implementation CPython
Compiler Clang 18.1.8
Executable /Users/davep/develop/python/quizzical/.venv/bin/python3

Operating System

Name Value
System Darwin
Release 24.1.0
Version Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:11 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6020

Terminal

Name Value
Terminal Application iTerm.app (3.5.10)
TERM xterm-256color
COLORTERM truecolor
FORCE_COLOR Not set
NO_COLOR Not set

Rich Console options

Name Value
size width=154, height=57
legacy_windows False
min_width 1
max_width 154
is_terminal True
encoding utf-8
max_height 57
justify None
overflow None
no_wrap False
highlight None
markup None
height None
Copy link

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

1 similar comment
Copy link

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant