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

Only checks the first value instead of the complete list #446

Closed
2 tasks done
cdgaete opened this issue Mar 27, 2024 · 1 comment
Closed
2 tasks done

Only checks the first value instead of the complete list #446

cdgaete opened this issue Mar 27, 2024 · 1 comment
Labels

Comments

@cdgaete
Copy link

cdgaete commented Mar 27, 2024

Things to check first

  • I have searched the existing issues and didn't find my bug already reported there

  • I have checked that my bug is still present in the latest release

Typeguard version

typeguard-4.2.1

Python version

Python 3.11.8 (main, Feb 26 2024, 21:39:34) [GCC 11.2.0] on linux

What happened?

I am expeting the TypeCheckError: item 1 of list is not an instance of str

How can we reproduce the bug?

from typeguard import check_type
from typing import List
string_list = ['nobody', 1, 1, 1, 1]
check_type(string_list, List[str])
@cdgaete cdgaete added the bug label Mar 27, 2024
@agronholm
Copy link
Owner

Duplicate of #430, #418 and #417.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants