svg-ultralight 0.50.1__py3-none-any.whl → 0.50.2__py3-none-any.whl

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.

@@ -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
@@ -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 QName
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 = etree.SubElement(parent, tag)
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
 
svg_ultralight/layout.py CHANGED
@@ -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:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: svg-ultralight
3
- Version: 0.50.1
3
+ Version: 0.50.2
4
4
  Summary: a sensible way to create svg files with Python
5
5
  Author: Shay Hill
6
6
  Author-email: Shay Hill <shay_public@hotmail.com>
@@ -1,6 +1,6 @@
1
1
  svg_ultralight/__init__.py,sha256=8orueEcPcbBPmtiK9BSCIEswqaBHxNREN6E4CIg1bEY,2732
2
2
  svg_ultralight/animate.py,sha256=pwboos8Z1GFNEGxHxIeeIyxyfRUew5pus2lG3P4MERU,1093
3
- svg_ultralight/attrib_hints.py,sha256=6nHzZG9Zup8SNtmQhHsSgptHxuGAiOJUr4Y82PONT84,368
3
+ svg_ultralight/attrib_hints.py,sha256=_p85b77mcmj15IUnsDtgbYJ3FFd-Q1qM2OERv2UEZ20,419
4
4
  svg_ultralight/bounding_boxes/__init__.py,sha256=YNCwgN-Ja2MFoCxIYxC3KZTCx_gFvPfRQ-8zBR5Q9mk,73
5
5
  svg_ultralight/bounding_boxes/bound_helpers.py,sha256=o_NlH3bBU6lvn8KPTvp7hrEDb5OLqwO3t-gc51d44Rk,6583
6
6
  svg_ultralight/bounding_boxes/padded_text_initializers.py,sha256=9keGI3g6F92dqQEtwHnoVrNrDBREXWmomvzeSnnaY2Q,8594
@@ -10,13 +10,13 @@ svg_ultralight/bounding_boxes/type_bound_element.py,sha256=CdbL48NMauCX5qZGlJes3
10
10
  svg_ultralight/bounding_boxes/type_bounding_box.py,sha256=81tyPpCHxRH1CXELO_qSCtueCyHYWBeEJO_JIxpl88Q,13101
11
11
  svg_ultralight/bounding_boxes/type_padded_text.py,sha256=1IV0DGjxem8celN4GAT8l60fLYhJwsES3O4tkHG7v60,14248
12
12
  svg_ultralight/constructors/__init__.py,sha256=fb-A50G3YTZNMQXpxcCl_QAcfssS0Us065_kdJRybDQ,313
13
- svg_ultralight/constructors/new_element.py,sha256=GIyvgJtMm8yrc_3P9HpA9IEhnsYdfnTV8p1TKWz_Ij0,3414
13
+ svg_ultralight/constructors/new_element.py,sha256=hVQG7WBHQoTUmGiZNtVadGOitdTFBrHOQeVKKVOWGaA,3526
14
14
  svg_ultralight/font_tools/__init__.py,sha256=b_VSvk5aODzS2wv48EMU2sey_mxq1o1SL8ecWTdy4kc,78
15
15
  svg_ultralight/font_tools/comp_results.py,sha256=KR6RtVGWjGGfHX2d_-XRx_Jr9CQ36kPbQxLVK1yzgTI,10421
16
16
  svg_ultralight/font_tools/font_info.py,sha256=OclOKrt38FN-3-mk71eCh-aTtcyrb8lzZdCamI0_msg,29243
17
17
  svg_ultralight/image_ops.py,sha256=cwR038ECUuiceIrk-9Peh5Ijp4tzjuaV5Y1cvYOt4TI,5454
18
18
  svg_ultralight/inkscape.py,sha256=_aQ42ZQ1JP9TFdHmtxgCRsXvxfZPpdZWTGKEea9BgIU,9336
19
- svg_ultralight/layout.py,sha256=ScngctQtTuMmFo9KoFDv0eq4i5N-XJKruFB-G6yQ8FI,12474
19
+ svg_ultralight/layout.py,sha256=yiTAYtSsYywdCObIdjkK3A4fiEYLNPqD3BOQKxfj6gQ,12514
20
20
  svg_ultralight/main.py,sha256=T5S2vtLU99JTVH1RucsWmQPlyltruWmQBMXAZEKbuok,7178
21
21
  svg_ultralight/metadata.py,sha256=kBaJ2QPpCn1s2f-qBGJxivA3HXoGTVKp4sU3-U0SQMw,4112
22
22
  svg_ultralight/nsmap.py,sha256=3N-x2I1iJ4EPWjYxIyHi4z8MVbJzxUyRvaGsiOijqmA,1208
@@ -27,8 +27,8 @@ svg_ultralight/root_elements.py,sha256=N4BBO1j2iUDIGbk70FRrtfElZo0AG-3Olqugxz7LD
27
27
  svg_ultralight/string_conversion.py,sha256=pzqkbGb-wXdhGd8ojEx4Hy-HBCC8fOfcloaLrNMh8TM,8607
28
28
  svg_ultralight/strings/__init__.py,sha256=iaRwr9AF9bPDkG3XvgGRSf8JPAS2GQ8ds9yCNpPN4ng,365
29
29
  svg_ultralight/strings/svg_strings.py,sha256=XlXQ5RqueGrROXBI4VzR2cK7e1NdNhYx5S84bgyqFUQ,3132
30
- svg_ultralight/transformations.py,sha256=A1kj-uMVUsVFdxr11Bkh8UpUpdot72JcligeyFF2ajY,4303
30
+ svg_ultralight/transformations.py,sha256=fnPMdMQFgT6OEUIDwb_A7tvuILraPFW1jR9I1RaI1cA,4325
31
31
  svg_ultralight/unit_conversion.py,sha256=Y32GZ5TLkvjDHM2kBw52M8ZxDNlpVSlDkSdRa1S_X-A,8985
32
- svg_ultralight-0.50.1.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
33
- svg_ultralight-0.50.1.dist-info/METADATA,sha256=dd4fuX_2jJdJSgINiD0UZm3TQ9vOiI2Q4e5k8x8RhTw,8691
34
- svg_ultralight-0.50.1.dist-info/RECORD,,
32
+ svg_ultralight-0.50.2.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
33
+ svg_ultralight-0.50.2.dist-info/METADATA,sha256=LoXD9iwEiqOnCRFyk2z2oRGfV-yvFp3gYb1x0ojPRPo,8691
34
+ svg_ultralight-0.50.2.dist-info/RECORD,,