Skip to content
Merged
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
3 changes: 2 additions & 1 deletion docxtpl/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

@author: Eric Lapouyade
"""
from __future__ import annotations

from os import PathLike
from typing import TYPE_CHECKING, Any, Optional, IO, Union, Dict, Set
Expand Down Expand Up @@ -537,7 +538,7 @@ def fix_tables(self, xml):
width = 0.0
new_average = None
for c in columns:
if not c.get(ns + "w") is None:
if c.get(ns + "w") is not None:
width += float(c.get(ns + "w"))
# try to keep proportion of table
if width > 0:
Expand Down