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

TypeError: can only join an iterable #123

Closed
nh13 opened this issue Jun 6, 2023 · 2 comments
Closed

TypeError: can only join an iterable #123

nh13 opened this issue Jun 6, 2023 · 2 comments

Comments

@nh13
Copy link

nh13 commented Jun 6, 2023

  File "/Users/nhomer/miniconda3/envs/sim-snps/lib/python3.11/site-packages/defopt.py", line 814, in depart_paragraph
    text = ''.join(self._current_paragraph)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
import defopt


def main(*, arg: int) -> None:
    """Short tool description

    longer description

    Args:
        arg: description
    
    Output Format 2:
    - detail 1
    - detail 2
        - sub-detail 2.2
    - detail 3
    """
    pass


if __name__ == '__main__':
    defopt.run(main)
@nh13
Copy link
Author

nh13 commented Jun 6, 2023

text = ''.join(self._current_paragraph)

might need to be:

            text = '' if self._current_paragraph is None else ''.join(self._current_paragraph)

but then the indent for "sub-detail 2.2" doesn't align correctly.

@anntzer
Copy link
Owner

anntzer commented Jun 6, 2023

This is not valid rst: indeed, docutils emits <string>:10: (ERROR/3) Unexpected indentation. to stderr.
In master I'm changing that so that docutils propagates the exception out.

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

No branches or pull requests

2 participants