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

Setting title_format = false does not work #164

Closed
vytas7 opened this issue Nov 3, 2019 · 3 comments
Closed

Setting title_format = false does not work #164

vytas7 opened this issue Nov 3, 2019 · 3 comments
Labels

Comments

@vytas7
Copy link

vytas7 commented Nov 3, 2019

Hello,
I would like to disable title generation as our file already has a title heading.

README.rst mentions this can be achieved by setting title_format to false in the pyproject.toml config:

    title_format = "{name} {version} ({project_date})"  # or false if template includes title

However, that doesn't quite work for me:

...

  File "<... my virtual env ...>/lib/python3.7/site-packages/towncrier/__init__.py", line 122, in __main
    top_line = config["title_format"].format(
AttributeError: 'bool' object has no attribute 'format'

Setting title_format to an empty string seems to work (?) as a workaround, although a lot of empty space is emitted suggesting it is sort of using that string to format a zero-length heading.

@altendky
Copy link
Member

@vytas7, I think this has been fixed though there seemed to be no tests for it. I added a couple in #299 (and snuck in one less newline which seemed more consistent). Would you be willing to take a look at that and/or try out the master branch to see if your issue is still present?

@vytas7
Copy link
Author

vytas7 commented Dec 14, 2020

Thanks for looking into this @altendky !
Checking master and your feature branch.

@vytas7
Copy link
Author

vytas7 commented Dec 14, 2020

towncrier==19.9.0rc1 already works as expected (false is honoured).
Now it's just a matter of getting a stable release out 🙂

(FWIW, using the branch from your PR did not render any difference in our case.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants