Skip to content

Conversation

@waketzheng
Copy link
Contributor

@waketzheng waketzheng commented Sep 23, 2025

Description

Move docxcompose to optional group 'subdoc', which can be installed by: pip install "docxtpl[subdoc]"

Related issue: #605 #602

@elapouya elapouya merged commit 7a6ddbc into elapouya:master Sep 24, 2025
@waketzheng waketzheng deleted the optional-docxcompose branch September 24, 2025 13:19
@svleeuwen
Copy link

Hi @waketzheng, thanks for this.

I'm just testing and getting an error because of the return type here:

    def new_subdoc(self, docpath=None) -> Subdoc:
        from .subdoc import Subdoc

        self.init_docx()
        return Subdoc(self, docpath)

This should use a string instead -> "Subdoc"

@waketzheng
Copy link
Contributor Author

OK, I will fix it soon.

@waketzheng
Copy link
Contributor Author

waketzheng commented Oct 2, 2025

I'm just testing and getting an error because of the return type here:

    def new_subdoc(self, docpath=None) -> Subdoc:
        from .subdoc import Subdoc

        self.init_docx()
        return Subdoc(self, docpath)

This should use a string instead -> "Subdoc"

@svleeuwen Fixed by #619 in favor of the from __future__ import annotations import

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.

3 participants