Skip to content

[Bug] in Intermediate empty-tuple exercise #121

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

Open
dabure opened this issue Sep 22, 2024 · 2 comments
Open

[Bug] in Intermediate empty-tuple exercise #121

dabure opened this issue Sep 22, 2024 · 2 comments

Comments

@dabure
Copy link

dabure commented Sep 22, 2024

Hi, I believe there is a bug in the in Intermediate empty-tuple exercise.

Relevant code:

foo((1))  # expect-type-error

(1) is not a tuple, but rather an integer, I believe a comma is missing. In effect, typing the function argument as tuple only will (incorrectly) pass the challenge.

Solution is to add a comma to make the argument a tuple:

foo((1,))  # expect-type-error

Thanks for providing fun and educative typing challenges.

@dabure dabure changed the title Bug in Intermediate empty-tuple exercise [Bug] in Intermediate empty-tuple exercise Sep 22, 2024
@laike9m
Copy link
Owner

laike9m commented Sep 22, 2024

Thanks for the catch. You're right, this is a bug and it should be foo((1,)). Do you want to make a PR to fix it?

@dabure
Copy link
Author

dabure commented Feb 15, 2025

Thanks for the catch. You're right, this is a bug and it should be foo((1,)). Do you want to make a PR to fix it?

Thanks for the reply and sorry for the late reply in turn. A bit swamped at work right now, so will have difficulties making time for this at the moment – would otherwise have been happy to contribute to such an excellent repository.

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