Skip to content

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

@davep

Description

@davep

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions