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

Chaining boltons.urlutils.URL.navigate() results in TypeError #298

Merged
merged 5 commits into from
Jan 15, 2022

Conversation

allanlei
Copy link
Contributor

@allanlei allanlei commented Jan 9, 2022

Chaining navigate() calls like boltons.urlutils.URL('...').navigate(...).navigate(...) produces TypeError: can only concatenate list (not "tuple") to list.

boltons.urlutils.URL('...').navigate(...).navigate(...) should be the equivalent of

url = boltons.urlutils.URL('...').navigate(...)
url = boltons.urlutils.URL(url).navigate(...)

This PR extends #159 as the test cases provided are incosistent if it was manually chained.

Fixes #158, #159, #160

wcooley and others added 5 commits May 31, 2018 14:53
This makes only one more test pass (now only 3 failing) but at least
prevents the `TypeError` when attempting to add a `list` and a `tuple`.
@mahmoud
Copy link
Owner

mahmoud commented Jan 15, 2022

Nice work, appreciate the tests! Also check out hyperlink. It's a bit different, but might fit the bill in some cases. :) Thanks again!

@mahmoud mahmoud merged commit 395f690 into mahmoud:master Jan 15, 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
Development

Successfully merging this pull request may close these issues.

URL.navigate fails with path in base URL
3 participants