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

simplify handling of extras #104

Merged
merged 1 commit into from
Dec 18, 2022
Merged

simplify handling of extras #104

merged 1 commit into from
Dec 18, 2022

Conversation

dimbleby
Copy link
Contributor

extras in this plug-in are never None, or True, or False: just a (possibly-empty) collection of strings

@neersighted
Copy link
Member

I'd like to bring this in, but it's failing mypy -- PTAL.

@dimbleby
Copy link
Contributor Author

dimbleby commented Oct 1, 2022

poetry types are already changed upstream to match this, but until a new version is released, mypy will fail here

@neersighted
Copy link
Member

Rebased on top of core 1.3.

@sonarcloud
Copy link

sonarcloud bot commented Oct 11, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
5.4% 5.4% Duplication

@neersighted
Copy link
Member

Wow, there's some fascinating failures happening -- back to you @dimbleby 😆

@dimbleby
Copy link
Contributor Author

dimbleby commented Oct 30, 2022

the reason for the failure is that in poetry 1.2.2 get_extra_package_names() returns an iterable, so the check that goes something like:

extra_package_names = get_extra_package_names()
for package in packages:
   if package in extra_package_names:
     ...

consumes the iterable as it goes and you might or might not be lucky when checking the second and subsequent packages.

On master, get_extra_package_names() returns a set and there is no problem.

Could patch this now with an explicit set(), or could wait for poetry 1.3 to be released. As usual, the circular dependency makes this more awkward than it ought to be...

@dimbleby
Copy link
Contributor Author

rebased on #167 which I expect should allow the CI to pass

it's never None, or True, or False: it's just a (possibly-empty)
collection of strings
@sonarcloud
Copy link

sonarcloud bot commented Dec 18, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
5.3% 5.3% Duplication

@radoering radoering merged commit d920881 into python-poetry:main Dec 18, 2022
@dimbleby dimbleby deleted the clean-up branch December 18, 2022 12:27
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