Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Mypy type hint error #491

Closed
Kontrolix opened this issue Nov 16, 2023 · 4 comments
Closed

Mypy type hint error #491

Kontrolix opened this issue Nov 16, 2023 · 4 comments

Comments

@Kontrolix
Copy link
Contributor

Kontrolix commented Nov 16, 2023

With the new release 0.14.0, we experienced a lot of mypy errors due to a bad type hint such as:

error: Argument 1 to "Coerce" has incompatible type "Callable[[Any, int, bool], Any]"; expected "type"  [arg-type]
error: Value of type "Schema" is not indexable  [index]
error: Unsupported target for indexed assignment ("Schema")  [index]
error: Returning Any from function declared to return "Schema"  [no-any-return]

I tried to fix the Coerce one here but I am facing some compatibility issues in the CI with python 3.7, 3.8, 3.9.

If we want to support mypy and type hint, do we really want to continue to support these old versions?

@antoni-szych-rtbhouse
Copy link
Contributor

side note:

@alecthomas
Copy link
Owner

I'm fine with dropping support for EOL Python versions.

Kontrolix added a commit to Kontrolix/voluptuous that referenced this issue Dec 13, 2023
According to alecthomas#491 (comment) 

This PR removes testing of versions 3.7 and 3.8.

We should also update pypi project metadata to update this flag: https://img.shields.io/pypi/pyversions/voluptuous.svg
@spacegaier
Copy link
Collaborator

@Kontrolix With the recent fixes in 0.15.x, are you still facing issues or can this issue be closed?

@Kontrolix
Copy link
Contributor Author

Sorry, but I'm no longer working for the company where I met those errors. So I can't tell you.

I gess we can close this issue.

@spacegaier spacegaier closed this as not planned Won't fix, can't repro, duplicate, stale Jul 2, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants