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
needimport supports extra options and links #234
Conversation
* extra options and links are imported * pre/post/template can be defined by needimport * same for style and layout Fixes #227
link_list = re.split(";|,", links_string) | ||
else: | ||
link_list = links_string | ||
for link in link_list: |
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.
do you want to add a type annotation to this function?
def _read_in_links(links_string: Union[str, List[str]]):
...
?
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.
Yes, will add it.
Sorry I'm not so familiar with type annotations (till now) :)
# template_location = os.path.join(os.path.dirname(os.path.abspath(__file__)), "needimport_template.rst") | ||
# with open(template_location, "r") as template_file: | ||
# template_content = template_file.read() | ||
# template = Template(template_content) | ||
# content = template.render(needs_list=needs_list, hide=hide, id_prefix=id_prefix) | ||
# self.state_machine.insert_input(content.split('\n'), | ||
# self.state_machine.document.attributes['source']) |
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.
if this is no longer used, should it just be deleted?
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.
Ohh yes.
Will add you next time as reviewer.
Thanks.
Fixes #227