Skip to content

Fix typing error#50

Merged
fohrloop merged 2 commits intowakepy:masterfrom
Aymane11:patch-1
Sep 27, 2023
Merged

Fix typing error#50
fohrloop merged 2 commits intowakepy:masterfrom
Aymane11:patch-1

Conversation

@Aymane11
Copy link
Copy Markdown
Contributor

fixes the TypeError: 'type' object is not subscriptable error when running __main__.py

fixes the `TypeError: 'type' object is not subscriptable` error when running `__main__.py`
@fohrloop
Copy link
Copy Markdown
Member

Hi @Aymane11 and thanks for noticing this! I've had made quite a lot of changes in the source since the last (0.7.1) release, so I merged everything back to master in #51. After the recent changes this PR has a merge conflict. Could you update the change to be based on the latest master ? (and don't worry about any tests; right now master is not in a working state but I can accept this without tests as it's just simple two-line fix:))

@Aymane11
Copy link
Copy Markdown
Contributor Author

@fohrloop Done, can you check please

@fohrloop
Copy link
Copy Markdown
Member

I will have this as part of the next release!

As support for generic type type annotations with built-in collection types was added in Python 3.9, it essentially means that wakepy <= 0.7.1 supports only Python 3.9+, and not Python 3.7+.

I'm also writing myself a note about adding tests for the CLI / __main__py.

Thank you @Aymane11 !

@fohrloop fohrloop closed this Sep 27, 2023
@fohrloop fohrloop reopened this Sep 27, 2023
@fohrloop fohrloop merged commit 47a2548 into wakepy:master Sep 27, 2023
@fohrloop fohrloop mentioned this pull request Sep 27, 2023
@fohrloop
Copy link
Copy Markdown
Member

Cherry picked this and released wakepy 0.7.2 with the fix

fohrloop pushed a commit that referenced this pull request Sep 27, 2023
fixes `__main__.py` for Python < 3.9

Error with Python < 3.9: `TypeError: 'type' object is not subscriptable`

Caused by using type annotation `dict` instead of `typing.Dict`.
@Aymane11 Aymane11 deleted the patch-1 branch October 2, 2023 11:01
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