-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add Lookup and misc updates. #14
Conversation
cc @rossbar |
and @tupui |
b547fa5
to
626aa65
Compare
Cool thanks 😃 |
intersphinx_registry/lookup.py
Outdated
if len(sys.argv) < 2: | ||
sys.exit("Usage: python -m intersphinx_registry.lookup [packages...]") | ||
|
||
packages = set(sys.argv[1:]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set
will not respect order so it might be better to explicitly iterate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but get_intersphinx_mapping
takes a set and mypy complains otherwise.
I don't think it will be used much with many packages, so I think we can have the order random for now and figure out if we want a stable order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might actually be worth limiting it to one library at a time - if you had multiple .inv
files in the same pager it might be harder to figure out which :external
library to map back to. FWIW I think the python -m sphinx.ext.intersphinx
lookup only supports one-at-a-time.
intersphinx_registry/lookup.py
Outdated
] | ||
|
||
|
||
import logging as _logging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move logging to the top.
python -m intersphinx_registry.lookup [package names] Not direction -m intersphinx_registry in case we want to add functionalities later.
Ok, it can only lookup one for now. |
No description provided.