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

feat: Allow registering absolute URLs for autorefs #8

Merged
merged 2 commits into from
May 1, 2021
Merged

feat: Allow registering absolute URLs for autorefs #8

merged 2 commits into from
May 1, 2021

Conversation

oprypin
Copy link
Member

@oprypin oprypin commented Apr 25, 2021

For now this is not used for anything, but the refactor is good for whatever plan we decide to go through regarding inventories.

For now this is not used for anything, but the refactor is good for whatever plan we decide to go through regarding inventories.
Copy link
Member

@pawamoy pawamoy left a comment

Choose a reason for hiding this comment

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

Just one comment.

if fallback:
new_identifier = fallback(identifier)
if new_identifier:
return self.get_item_url(new_identifier, from_url)
Copy link
Member

Choose a reason for hiding this comment

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

Don't we risk infinite recursion here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, sorry that there's no explanation for the "cleverness".

The self-call is not exactly the same, fallback is dropped. So, no, there will be only 2 attempts.

I'll add an explicit fallback=None for clarity.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, my bad for not reading this more thoroughly, I would have seen it 🙂
Thanks for the explanation. The fallback=None is not necessary, but you can add it if you want.

Copy link
Member

Choose a reason for hiding this comment

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

And you did. Thanks again ^^

Copy link
Member Author

Choose a reason for hiding this comment

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

Ooh let me revert that, there's some failure, and it's a concern for backwards compatibility.
I'll also check in detail why the test failed, I would not have expected that

Copy link
Member Author

Choose a reason for hiding this comment

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

This is resolved btw. There wasn't really a problem, just an implicit merge conflict

@pawamoy pawamoy merged commit 621686b into mkdocstrings:master May 1, 2021
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.

2 participants