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

Handle multiple extras and invalid extras #103

Merged
merged 1 commit into from
Sep 2, 2022

Conversation

KotlinIsland
Copy link
Contributor

@KotlinIsland KotlinIsland commented Aug 28, 2022

resolves: #31
resolves: #33

@KotlinIsland KotlinIsland force-pushed the main branch 2 times, most recently from 944b73a to 43c9440 Compare August 28, 2022 10:10
# Checking extras
extras = []
for extra in self.option("extras"):
if " " in extra:
Copy link
Contributor

Choose a reason for hiding this comment

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

I realise I pointed you at code like this to copy, but it occurs to me now that the two branches are unnecessary, this first branch works fine for both cases.

Copy link
Contributor

@dimbleby dimbleby Aug 28, 2022

Choose a reason for hiding this comment

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

in fact come to think of it isn't this whole thing just

extras += extra.split()

Copy link
Contributor Author

@KotlinIsland KotlinIsland Aug 29, 2022

Choose a reason for hiding this comment

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

Not quite, I think it would be:

extras.extend(extra.split())

Anyway I changed it to a double comprehension, 🤞 I don't get sent straight to hell

Copy link
Contributor

Choose a reason for hiding this comment

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

I think my formulation was fine and I like it a little better, but it's not worth arguing over!

src/poetry_plugin_export/command.py Outdated Show resolved Hide resolved
tests/command/test_command_export.py Outdated Show resolved Hide resolved
@KotlinIsland KotlinIsland force-pushed the main branch 2 times, most recently from ce50916 to a6cb5ab Compare August 29, 2022 07:59
@KotlinIsland KotlinIsland requested a review from dimbleby August 29, 2022 07:59
@sonarqubecloud
Copy link

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
No Duplication information No Duplication information

@KotlinIsland KotlinIsland mentioned this pull request Aug 29, 2022
@radoering radoering merged commit dc91a5f into python-poetry:main Sep 2, 2022
@radoering radoering mentioned this pull request Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants