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

Fix find_pyproject_toml type hint #1495

Merged
merged 1 commit into from
Jun 15, 2020
Merged

Fix find_pyproject_toml type hint #1495

merged 1 commit into from
Jun 15, 2020

Conversation

schmir
Copy link
Contributor

@schmir schmir commented Jun 13, 2020

The function is being called with a tuple of strings.

@ichard26
Copy link
Collaborator

Thanks for the PR! Please don't mind the failing primer workflows, that is due a different change in an unrelated project. I might've made those changes in bandersnatch pypa/bandersnatch#561 ... whoops :)

@cooperlees
Copy link
Collaborator

Pushed the black format fix to stop bandersnatch being evil to our CI: pypa/bandersnatch@0ad7b49

Copy link
Collaborator

@cooperlees cooperlees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me - Thanks for the find. I think str is an iterable, thus no error. This is much clearer tho imo.

@schmir
Copy link
Contributor Author

schmir commented Jun 13, 2020

Makes sense to me - Thanks for the find. I think str is an iterable, thus no error. This is much clearer tho imo.

I'm not sure why mypy doesn't catch that error, it's pretty much obvious if you look at how it's being called:

value = find_pyproject_toml(ctx.params.get("src", ()))

Maybe you should run mypy with more strict settings.

@cooperlees cooperlees merged commit b2c13de into psf:master Jun 15, 2020
@schmir schmir deleted the fix-find_pyproject_toml-type-hint branch June 17, 2020 20:31
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