-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
[BUG] tuple[int, int] | None
causes IndexError, but Optional[tuple[int, int]]
does not
#117
Comments
bczsalba
changed the title
[BUG] tuple[int, int] | None causes IndexError, but Optional[tuple[int, int]] does not
[BUG] Aug 11, 2022
tuple[int, int] | None
causes IndexError, but Optional[tuple[int, int]]
does not
Hi @bczsalba, sorry for the late reply, and thanks for the report. |
pawamoy
added a commit
that referenced
this issue
Nov 30, 2022
Fixed in 727456d, will try to release soon. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When trying to run
mkdocs serve
on PyTermGUI,pytermgui/ansi_interface
fails to be parsed due to anIndexError
.To Reproduce
Steps to reproduce the behavior:
new-docs
mkdocs serve
in the git rootExpected behavior
Things should be parsed.
Screenshots
System (please complete the following information):
pytkdocs
version: Not installed when the error first occured, still happens after installing 0.16.1.Additional context
I initially wanted to submit this issue over at griffe, but it turned out that it could parse the module no problem. Then I looked at
mkdocstrings
, and was redirected over to here. Note thatpytkdocs
wasn't installed by PIP when this started happening, and installing it didn't do much in terms of fixing the problem.After messing around with the griffe source for a bit, I managed to narrow it down to this return annotation:
https://github.com/bczsalba/pytermgui/blob/06f2ec78d1b31d2a059035e72e8d1b014c929b81/pytermgui/ansi_interface.py#L156
After changing it to
Optional[tuple[int, int]]
, the error goes away.No idea if I'm in the right place or not, or if the issue is completely up to me 🙂. I did look around for similar issues, but the one related post I found (#140) wasn't really what I was experiencing.
The text was updated successfully, but these errors were encountered: