svg-ultralight 0.50.1__tar.gz → 0.50.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of svg-ultralight might be problematic. Click here for more details.
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/PKG-INFO +1 -1
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/pyproject.toml +2 -2
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/attrib_hints.py +3 -2
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/constructors/new_element.py +8 -3
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/layout.py +2 -1
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/transformations.py +2 -2
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/README.md +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/__init__.py +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/animate.py +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/bounding_boxes/__init__.py +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/bounding_boxes/bound_helpers.py +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/bounding_boxes/padded_text_initializers.py +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/bounding_boxes/supports_bounds.py +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/bounding_boxes/type_bound_collection.py +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/bounding_boxes/type_bound_element.py +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/bounding_boxes/type_bounding_box.py +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/bounding_boxes/type_padded_text.py +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/constructors/__init__.py +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/font_tools/__init__.py +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/font_tools/comp_results.py +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/font_tools/font_info.py +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/image_ops.py +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/inkscape.py +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/main.py +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/metadata.py +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/nsmap.py +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/py.typed +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/query.py +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/read_svg.py +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/root_elements.py +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/string_conversion.py +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/strings/__init__.py +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/strings/svg_strings.py +0 -0
- {svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/unit_conversion.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "svg-ultralight"
|
|
3
|
-
version = "0.50.
|
|
3
|
+
version = "0.50.2"
|
|
4
4
|
description = "a sensible way to create svg files with Python"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT"
|
|
@@ -33,7 +33,7 @@ dev = [
|
|
|
33
33
|
|
|
34
34
|
[tool.commitizen]
|
|
35
35
|
name = "cz_conventional_commits"
|
|
36
|
-
version = "0.50.
|
|
36
|
+
version = "0.50.2"
|
|
37
37
|
tag_format = "$version"
|
|
38
38
|
major-version-zero = true
|
|
39
39
|
version_files = ["pyproject.toml:^version"]
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
7
|
from collections.abc import Mapping
|
|
8
|
+
from typing import TypeAlias
|
|
8
9
|
|
|
9
10
|
# Types svg_ultralight can format to pass through to lxml constructors.
|
|
10
|
-
ElemAttrib = str | float | None
|
|
11
|
+
ElemAttrib: TypeAlias = str | float | None
|
|
11
12
|
|
|
12
13
|
# Type for an optional dictionary of element attributes.
|
|
13
|
-
OptionalElemAttribMapping = Mapping[str, ElemAttrib] | None
|
|
14
|
+
OptionalElemAttribMapping: TypeAlias = Mapping[str, ElemAttrib] | None
|
{svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/constructors/new_element.py
RENAMED
|
@@ -13,14 +13,16 @@ from __future__ import annotations
|
|
|
13
13
|
|
|
14
14
|
import copy
|
|
15
15
|
import warnings
|
|
16
|
-
from typing import TYPE_CHECKING
|
|
16
|
+
from typing import TYPE_CHECKING, cast
|
|
17
17
|
|
|
18
18
|
from lxml import etree
|
|
19
19
|
|
|
20
20
|
from svg_ultralight.string_conversion import set_attributes
|
|
21
21
|
|
|
22
22
|
if TYPE_CHECKING:
|
|
23
|
-
from lxml.etree import
|
|
23
|
+
from lxml.etree import (
|
|
24
|
+
QName,
|
|
25
|
+
)
|
|
24
26
|
from lxml.etree import (
|
|
25
27
|
_Element as EtreeElement, # pyright: ignore[reportPrivateUsage]
|
|
26
28
|
)
|
|
@@ -78,7 +80,10 @@ def new_sub_element(
|
|
|
78
80
|
>>> etree.tostring(parent)
|
|
79
81
|
b'<g><rect/></g>'
|
|
80
82
|
"""
|
|
81
|
-
elem =
|
|
83
|
+
elem = cast(
|
|
84
|
+
"EtreeElement",
|
|
85
|
+
etree.SubElement(parent, tag), # pyright: ignore[reportUnknownMemberType]
|
|
86
|
+
)
|
|
82
87
|
set_attributes(elem, **attributes)
|
|
83
88
|
return elem
|
|
84
89
|
|
|
@@ -7,11 +7,12 @@
|
|
|
7
7
|
from __future__ import annotations
|
|
8
8
|
|
|
9
9
|
from collections.abc import Sequence
|
|
10
|
+
from typing import TypeAlias
|
|
10
11
|
|
|
11
12
|
from svg_ultralight.string_conversion import format_number
|
|
12
13
|
from svg_ultralight.unit_conversion import Measurement, MeasurementArg
|
|
13
14
|
|
|
14
|
-
PadArg = float | str | Measurement | Sequence[float | str | Measurement]
|
|
15
|
+
PadArg: TypeAlias = float | str | Measurement | Sequence[float | str | Measurement]
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
def expand_pad_arg(pad: PadArg) -> tuple[float, float, float, float]:
|
|
@@ -9,7 +9,7 @@ from __future__ import annotations
|
|
|
9
9
|
import numbers
|
|
10
10
|
import re
|
|
11
11
|
from contextlib import suppress
|
|
12
|
-
from typing import TYPE_CHECKING, cast
|
|
12
|
+
from typing import TYPE_CHECKING, TypeAlias, cast
|
|
13
13
|
|
|
14
14
|
from svg_ultralight.strings import svg_matrix
|
|
15
15
|
|
|
@@ -21,7 +21,7 @@ if TYPE_CHECKING:
|
|
|
21
21
|
|
|
22
22
|
RE_MATRIX = re.compile(r"matrix\(([^)]+)\)")
|
|
23
23
|
|
|
24
|
-
_Matrix = tuple[float, float, float, float, float, float]
|
|
24
|
+
_Matrix: TypeAlias = tuple[float, float, float, float, float, float]
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
def mat_dot(mat1: _Matrix, mat2: _Matrix) -> _Matrix:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/bounding_boxes/__init__.py
RENAMED
|
File without changes
|
{svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/bounding_boxes/bound_helpers.py
RENAMED
|
File without changes
|
|
File without changes
|
{svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/bounding_boxes/supports_bounds.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{svg_ultralight-0.50.1 → svg_ultralight-0.50.2}/src/svg_ultralight/font_tools/comp_results.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|