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

TypeError: 'type' object is not subscriptable #54

Closed
aadant opened this issue Feb 29, 2024 · 3 comments
Closed

TypeError: 'type' object is not subscriptable #54

aadant opened this issue Feb 29, 2024 · 3 comments

Comments

@aadant
Copy link

aadant commented Feb 29, 2024

$ python --version
Python 3.8.18

$ dolphie
Traceback (most recent call last):
  File "/home/aadant/gitLocal/jump-splunk-ansible/.venv/bin/dolphie", line 5, in <module>
    from dolphie.app import main
  File "/home/aadant/gitLocal/jump-splunk-ansible/.venv/lib/python3.8/site-packages/dolphie/app.py", line 27, in <module>
    from dolphie.Modules.TabManager import Tab, TabManager
  File "/home/aadant/gitLocal/jump-splunk-ansible/.venv/lib/python3.8/site-packages/dolphie/Modules/TabManager.py", line 105, in <module>
    class TabManager:
  File "/home/aadant/gitLocal/jump-splunk-ansible/.venv/lib/python3.8/site-packages/dolphie/Modules/TabManager.py", line 460, in TabManager
    def get_all_tabs(self) -> list[Tab]:
TypeError: 'type' object is not subscriptable

$ pip list | grep dolphie
dolphie                   4.3.1
@charles-001
Copy link
Owner

Hi @aadant - thanks for letting me know about this along with my apologies for that error. You're seeing that because Python 3.8 doesn't support subscript notation in type hint annotations. Instead, I need to use List from typing module. I will be pushing this fix in v4.3.2 here shortly.

@charles-001
Copy link
Owner

charles-001 commented Feb 29, 2024

v4.3.2 is now deployed with this fix

@aadant
Copy link
Author

aadant commented Feb 29, 2024

ok confirmed that it works after the upgrade

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

No branches or pull requests

2 participants