8000 rfctr: Section type-checks clean · python-openxml/python-docx@58c2453 · GitHub
[go: up one dir, main page]

Skip to content
Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 58c2453

Browse files
committed
rfctr: Section type-checks clean
1 parent 8122909 commit 58c2453

File tree

14 files changed

+669
-533
lines changed

14 files changed

+669
-533
lines changed

docs/user/sections.rst

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@
33
Working with Sections
44
=====================
55

6-
Word supports the notion of a `section`, a division of a document having the
7-
same page layout settings, such as margins and page orientation. This is how,
8-
for example, a document can contain some pages in portrait layout and others in
9-
landscape.
10-
11-
Most Word documents have only the single section that comes by default and
12-
further, most of those have no reason to change the default margins or other
13-
page layout. But when you `do` need to change the page layout, you'll need
14-
to understand sections to get it done.
6+
Word supports the notion of a `section`, a division of a document having the same page
7+
layout settings, such as margins and page orientation. This is how, for example, a
8+
document can contain some pages in portrait layout and others in landscape. Each section
9+
also defines the headers and footers that apply to the pages of that section.
10+
11+
Most Word documents have only the single section that comes by default and further, most
12+
of those have no reason to change the default margins or other page layout. But when you
13+
`do` need to change the page layout, you'll need to understand sections to get it done.
1514

1615

1716
Accessing sections

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ norecursedirs = [
5353
]
5454
python_files = ["test_*.py"]
5555
python_classes = ["Test", "Describe"]
56-
python_functions = ["it_", "they_", "and_it_", "but_it_"]
56+
python_functions = ["it_", "its_", "they_", "and_", "but_"]
5757

5858
[tool.ruff]
5959
exclude = []

src/docx/opc/part.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def content_type(self):
5555
"""Content type of this part."""
5656
return self._content_type
5757

58-
def drop_rel(self, rId):
58+
def drop_rel(self, rId: str):
5959
"""Remove the relationship identified by `rId` if its reference count is less
6060
than 2.
6161

0 commit comments

Comments
 (0)
0