Skip to content

Commit 54e5e50

Browse files
committed
Fix merge conflicts
1 parent f548b6e commit 54e5e50

20 files changed

Lines changed: 47 additions & 214 deletions

.github/workflows/codestyle.yml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,20 @@ jobs:
99
matrix:
1010
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
1111
steps:
12-
<<<<<<< HEAD
13-
- uses: actions/checkout@v4
14-
- name: Set up Python ${{ matrix.python-version }}
15-
uses: actions/setup-python@v5
16-
with:
17-
python-version: ${{ matrix.python-version }}
18-
allow-prereleases: true
19-
- uses: astral-sh/setup-uv@v6
20-
=======
2112
- uses: actions/checkout@v5
2213
- name: Set up Python ${{ matrix.python-version }}
2314
uses: actions/setup-python@v6
2415
with:
2516
python-version: ${{ matrix.python-version }}
2617
allow-prereleases: true
27-
>>>>>>> type-hints
2818
- name: Install dependencies
29-
run: uv sync --all-extras --all-groups
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install -r requirements.txt
3022
- name: Lint with flake8
3123
run: |
24+
pip install flake8
3225
# stop the build if there are code styling problems. The GitHub editor is 127 chars wide.
33-
<<<<<<< HEAD
34-
uv run flake8 . --count --max-line-length=127 --show-source --statistics --exclude .venv,__pycache__
35-
- name: Check type hints
36-
run: uv run mypy .
37-
=======
3826
flake8 . --count --max-line-length=127 --show-source --statistics
3927
- name: Check type hints
4028
run: |
@@ -44,4 +32,3 @@ jobs:
4432
run: |
4533
pip uninstall -y docxcompose
4634
python -c "from docxtpl import *"
47-
>>>>>>> type-hints

.github/workflows/test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ jobs:
1919
env:
2020
GITHUB_CONTEXT: ${{ toJson(github) }}
2121
run: echo "$GITHUB_CONTEXT"
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v5
2323
- name: Set up Python
24-
uses: actions/setup-python@v5
24+
uses: actions/setup-python@v6
2525
with:
2626
python-version: ${{ matrix.python-version }}
2727
allow-prereleases: true
2828
- uses: astral-sh/setup-uv@v6
2929
- name: Install dependencies
30-
run: uv sync --all-extras
30+
run: uv sync --all-extras --all-groups
3131
- name: Test
3232
run: uv run python tests/runtests.py
3333
- name: Build
@@ -37,11 +37,11 @@ jobs:
3737
runs-on: ubuntu-latest
3838
container: python:3.7-slim
3939
steps:
40-
- uses: actions/checkout@v4
41-
- uses: actions/setup-python@v5
40+
- uses: actions/checkout@v5
41+
- uses: actions/setup-python@v6
4242
- uses: astral-sh/setup-uv@v6
4343
- name: Install dependencies
44-
run: uv sync --all-extras --python=python3.7
44+
run: uv sync --all-extras --all-groups --python=python3.7
4545
- name: Test
4646
run: |
4747
uv run python tests/runtests.py

docxtpl/inline_image.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,10 @@
77

88
from __future__ import annotations
99

10-
<<<<<<< HEAD
11-
from typing import IO
12-
=======
1310
from typing import IO, TYPE_CHECKING
14-
>>>>>>> type-hints
1511

1612
from docx.oxml import OxmlElement, parse_xml
1713
from docx.oxml.ns import qn
18-
from docx.shared import Length
19-
20-
from .template import DocxTemplate
2114

2215
if TYPE_CHECKING:
2316
from docx.shared import Length

docxtpl/listing.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,7 @@
55
@author: Eric Lapouyade
66
"""
77

8-
<<<<<<< HEAD
9-
try:
10-
from html import escape
11-
except ImportError:
12-
# cgi.escape is deprecated in python 3.7
13-
from cgi import escape # type:ignore[attr-defined,no-redef]
14-
=======
158
from ._compat import escape
16-
>>>>>>> type-hints
179

1810

1911
class Listing(object):

docxtpl/richtext.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,7 @@
55
@author: Eric Lapouyade
66
"""
77

8-
<<<<<<< HEAD
9-
try:
10-
from html import escape
11-
except ImportError:
12-
# cgi.escape is deprecated in python 3.7
13-
from cgi import escape # type:ignore[attr-defined,no-redef]
14-
=======
158
from ._compat import escape
16-
>>>>>>> type-hints
179

1810

1911
class RichText(object):
@@ -46,6 +38,7 @@ def add(
4638
rtl=False,
4739
lang=None,
4840
):
41+
4942
# If a RichText is added
5043
if isinstance(text, RichText):
5144
self.xml += text.xml
@@ -154,6 +147,7 @@ def add(
154147
text,
155148
parastyle=None,
156149
):
150+
157151
# If a RichText is added
158152
if not isinstance(text, RichText):
159153
text = RichText(text)

docxtpl/subdoc.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
@author: Eric Lapouyade
66
"""
77

8-
import re
9-
108
from docx import Document
11-
from docx.opc.constants import RELATIONSHIP_TYPE as RT
129
from docx.oxml import CT_SectPr
13-
from docxcompose.composer import Composer
10+
from docx.opc.constants import RELATIONSHIP_TYPE as RT
1411
from docxcompose.properties import CustomProperties
15-
from docxcompose.utils import NS, xpath
12+
from docxcompose.utils import xpath
13+
from docxcompose.composer import Composer
14+
from docxcompose.utils import NS
1615
from lxml import etree
16+
import re
1717

1818

1919
class SubdocComposer(Composer):

0 commit comments

Comments
 (0)