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

[type hint] fix for Python 3.8 incompatible typehints #1031

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

jbflo
Copy link
Member

@jbflo jbflo commented Sep 23, 2024

@marcus-oscarsson @woutdenolf As suggest i had the the line to fix the issue

@fabcor-maxiv
Copy link
Contributor

I do not know why this fixes the issue. I must say I never understood how from __future__ import annotations works.

If it were me, I think I would have actually fixed the type annotations ( typing.Dict[str] I guess). But I am fine with this fix if it means we do not have to change it back again to dict[str] later when we get rid of Python 3.8.

@fabcor-maxiv
Copy link
Contributor

But bigger issue, I do not know why this issue went undetected by our checks... that is not good.

@jbflo
Copy link
Member Author

jbflo commented Sep 25, 2024

But bigger issue, I do not know why this issue went undetected by our checks... that is not good.

Yeah.. In addition of this easy fix, we could maybe investigate why it passed the check .

@marcus-oscarsson
Copy link
Member

Hm, its more two separate issues I would say. I also prefer to explicitly do from typing import Dict but from __future__ import annotations would also work especially as we would remove it once we drop support for Python 3.8 (which I guess could be relatively soon)

Yes, we should investigate why the tests passed even though they should not have. The application should not even have started with Python 3.8, so it is indeed strange.

@marcus-oscarsson marcus-oscarsson merged commit 3c9a254 into develop Sep 26, 2024
11 checks passed
@marcus-oscarsson marcus-oscarsson deleted the develop-py38 branch September 26, 2024 09:29
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.

3 participants