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

needimport supports extra options and links #234

Merged
merged 3 commits into from Apr 19, 2021
Merged

needimport supports extra options and links #234

merged 3 commits into from Apr 19, 2021

Conversation

danwos
Copy link
Member

@danwos danwos commented Apr 17, 2021

  • extra options and links are imported
  • pre/post/template can be defined by needimport
  • same for style and layout

Fixes #227

* 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:
Copy link
Contributor

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]]):
    ...

?

Copy link
Member Author

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) :)

Comment on lines 122 to 128
# 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'])
Copy link
Contributor

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?

Copy link
Member Author

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.

@danwos danwos merged commit 8a7fe9b into master Apr 19, 2021
@danwos danwos deleted the importer_bugfix branch January 20, 2022 08:45
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.

needimport ignores all links between needs
2 participants