Skip to content

AI-generated possible solution for #10703 (B)#10925

Open
hugnia wants to merge 1 commit into
python-poetry:mainfrom
hugnia:routing-preference/issue-10703/solution-b
Open

AI-generated possible solution for #10703 (B)#10925
hugnia wants to merge 1 commit into
python-poetry:mainfrom
hugnia:routing-preference/issue-10703/solution-b

Conversation

@hugnia
Copy link
Copy Markdown

@hugnia hugnia commented May 26, 2026

Hi,

We're a research team at JetBrains studying how maintainers evaluate AI-generated code.

We opened two pull requests as possible solutions to the corresponding issue, each taking a different approach. Both were generated by AI and have not yet been manually reviewed by a human. We’d like to get your perspective on these two solutions via a 10-minute survey. Regardless of your role, we want to know which solution actually saves you work, and which qualities of AI-generated code matter most when working with the codebase.

If you're open to participating in our study, just reply "I'm interested" here, and we'll send the details to the contact specified in your GitHub profile. If you'd rather not take part, feel free to close the PRs – we won’t post them again.

Thanks!

Issue #10703

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The code treats project.optional-dependencies[extra_name] as if it had the same shape as dependency groups (e.g., passing extra_deps/optional_dependencies[group] as standard_section), but PEP 621 extras are lists of requirement strings, so this is likely to break _remove_packages or produce malformed content; consider adapting the logic to the actual extras structure instead of reusing the group-handling path directly.
  • By appending extras into group_sections and reusing the group-based removal flow, you’re conceptually conflating dependency groups and extras; it may be clearer and less error‑prone to handle extras in a separate, explicit branch rather than mixing them into the existing group pipeline.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The code treats `project.optional-dependencies[extra_name]` as if it had the same shape as dependency groups (e.g., passing `extra_deps`/`optional_dependencies[group]` as `standard_section`), but PEP 621 extras are lists of requirement strings, so this is likely to break `_remove_packages` or produce malformed content; consider adapting the logic to the actual extras structure instead of reusing the group-handling path directly.
- By appending extras into `group_sections` and reusing the `group`-based removal flow, you’re conceptually conflating dependency groups and extras; it may be clearer and less error‑prone to handle extras in a separate, explicit branch rather than mixing them into the existing group pipeline.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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.

1 participant