Skip to content

fix(utils): keep quoted local paths in poetry add - #11054

Open
r3wretrhy wants to merge 1 commit into
python-poetry:mainfrom
r3wretrhy:fix-utils-quoted-path-dep
Open

r3wretrhy wants to merge 1 commit into
python-poetry:mainfrom
r3wretrhy:fix-utils-quoted-path-dep

Conversation

@r3wretrhy

Copy link
Copy Markdown

RequirementsParser._parse_path passed the requirement string to Path() as-is. A quoted local path with spaces such as "./foo bar" therefore looked up a name that included the quote characters and was not treated as a path.

Strip a matching outer ' or " pair before the exists/absolute checks. Unquoted paths are unchanged.

The added tests fail on the unpatched tree and pass with the change.

sourcery-ai[bot]
sourcery-ai Bot previously approved these changes Sep 10, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@r3wretrhy
r3wretrhy force-pushed the fix-utils-quoted-path-dep branch from 07fb9f3 to f1e29b3 Compare September 10, 2026 02:28
@sourcery-ai
sourcery-ai Bot dismissed their stale review September 10, 2026 02:28

Sourcery withdrew this approval because the latest commits introduced blocking findings.

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