Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
13 changes: 11 additions & 2 deletions docxtpl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,20 @@
"""

__version__ = "0.20.2"
__all__ = (
"InlineImage",
"Listing",
"RichText",
"R",
"RichTextParagraph",
"RP",
"DocxTemplate",
"Subdoc",
)

# flake8: noqa
from .inline_image import InlineImage
from .listing import Listing
from .richtext import RichText, R, RichTextParagraph, RP
from .richtext import RP, R, RichText, RichTextParagraph
from .template import DocxTemplate

try:
Expand Down
10 changes: 5 additions & 5 deletions docxtpl/subdoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
@author: Eric Lapouyade
"""

import re

from docx import Document
from docx.oxml import CT_SectPr
from docx.opc.constants import RELATIONSHIP_TYPE as RT
from docxcompose.properties import CustomProperties
from docxcompose.utils import xpath
from docx.oxml import CT_SectPr
from docxcompose.composer import Composer
from docxcompose.utils import NS
from docxcompose.properties import CustomProperties
from docxcompose.utils import NS, xpath
from lxml import etree
import re


class SubdocComposer(Composer):
Expand Down
19 changes: 10 additions & 9 deletions docxtpl/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,29 @@
"""
from __future__ import annotations

from os import PathLike
from typing import TYPE_CHECKING, Any, Optional, IO, Union, Dict, Set
import binascii
import functools
import io
from lxml import etree
import os
import re
import zipfile
from os import PathLike
from typing import IO, TYPE_CHECKING, Any, Dict, Optional, Set, Union

import docx.oxml.ns
from docx import Document
from docx.opc.constants import RELATIONSHIP_TYPE as REL_TYPE
from docx.opc.oxml import parse_xml
from docx.opc.part import XmlPart
import docx.oxml.ns
from docx.opc.constants import RELATIONSHIP_TYPE as REL_TYPE
from jinja2 import Environment, Template, meta
from jinja2.exceptions import TemplateError
from lxml import etree

try:
from html import escape # noqa: F401
except ImportError:
# cgi.escape is deprecated in python 3.7
from cgi import escape # noqa: F401
import re
import binascii
import os
import zipfile

if TYPE_CHECKING:
from .subdoc import Subdoc
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ classifiers=[
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
keywords = ["jinja2"]
dependencies = [
Expand Down