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

Fix Lines type alias definition #21

Merged
merged 1 commit into from
Jul 5, 2021

Conversation

ramiro
Copy link
Contributor

@ramiro ramiro commented Jul 5, 2021

Currently it fails with

Traceback (most recent call last):
  File "~/.pyenv/versions/3.7.9/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "~/.pyenv/versions/3.7.9/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "~/.virtualenvs/tmp-32ba2626ac1e0/lib/python3.7/site-packages/textual/app.py", line 18, in <module>
    from . import events
  File "~/.virtualenvs/tmp-32ba2626ac1e0/lib/python3.7/site-packages/textual/events.py", line 7, in <module>
    from .message import Message
  File "~/.virtualenvs/tmp-32ba2626ac1e0/lib/python3.7/site-packages/textual/message.py", line 7, in <module>
    from ._types import MessageTarget
  File "~/.virtualenvs/tmp-32ba2626ac1e0/lib/python3.7/site-packages/textual/_types.py", line 31, in <module>
    Lines = list[list[Segment]]
TypeError: 'type' object is not subscriptable

Currently it fails with
```python
Traceback (most recent call last):
  File "~/.pyenv/versions/3.7.9/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "~/.pyenv/versions/3.7.9/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "~/.virtualenvs/tmp-32ba2626ac1e0/lib/python3.7/site-packages/textual/app.py", line 18, in <module>
    from . import events
  File "~/.virtualenvs/tmp-32ba2626ac1e0/lib/python3.7/site-packages/textual/events.py", line 7, in <module>
    from .message import Message
  File "~/.virtualenvs/tmp-32ba2626ac1e0/lib/python3.7/site-packages/textual/message.py", line 7, in <module>
    from ._types import MessageTarget
  File "~/.virtualenvs/tmp-32ba2626ac1e0/lib/python3.7/site-packages/textual/_types.py", line 31, in <module>
    Lines = list[list[Segment]]
TypeError: 'type' object is not subscriptable
```
@willmcgugan
Copy link
Collaborator

Thanks

@willmcgugan willmcgugan merged commit ef69962 into Textualize:main Jul 5, 2021
@ramiro ramiro deleted the fix-list-type-alias-def branch July 5, 2021 18:56
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 this pull request may close these issues.

2 participants