moat-lib-path 0.3.1__tar.gz → 0.3.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moat-lib-path
3
- Version: 0.3.1
3
+ Version: 0.3.3
4
4
  Summary: Hierarchical path representation and manipulation for MoaT
5
5
  Maintainer-email: Matthias Urlichs <matthias@urlichs.de>
6
6
  Project-URL: homepage, https://m-o-a-t.org
@@ -1,3 +1,27 @@
1
+ moat-lib-path (0.3.3-1) unstable; urgency=medium
2
+
3
+ * New release for 26.1.10
4
+
5
+ -- Matthias Urlichs <matthias@urlichs.de> Thu, 23 Apr 2026 21:17:55 +0200
6
+
7
+ moat-lib-path (0.3.2-2) unstable; urgency=medium
8
+
9
+ * New release for 26.1.7
10
+
11
+ -- Matthias Urlichs <matthias@urlichs.de> Wed, 15 Apr 2026 16:36:43 +0200
12
+
13
+ moat-lib-path (0.3.2-1) unstable; urgency=medium
14
+
15
+ * New release for 26.1.5
16
+
17
+ -- Matthias Urlichs <matthias@urlichs.de> Sun, 12 Apr 2026 12:34:32 +0200
18
+
19
+ moat-lib-path (0.3.1-2) unstable; urgency=medium
20
+
21
+ * New release for 26.1.1
22
+
23
+ -- Matthias Urlichs <matthias@urlichs.de> Wed, 08 Apr 2026 20:10:18 +0200
24
+
1
25
  moat-lib-path (0.3.1-1) unstable; urgency=medium
2
26
 
3
27
  * New release for 26.0.20
@@ -22,7 +22,7 @@ name = "moat-lib-path"
22
22
  maintainers = [{email = "matthias@urlichs.de",name = "Matthias Urlichs"}]
23
23
  description='Hierarchical path representation and manipulation for MoaT'
24
24
  readme = "README.md"
25
- version = "0.3.1"
25
+ version = "0.3.3"
26
26
 
27
27
  [project.urls]
28
28
  homepage = "https://m-o-a-t.org"
@@ -568,7 +568,11 @@ class Path(Sequence[PathElem]):
568
568
  if len(self) == 0 and self._prefix is None:
569
569
  return Path.build(other)
570
570
  if isinstance(other, Path):
571
- if isinstance(other._prefix, Path) and self._prefix != other._prefix:
571
+ if (
572
+ isinstance(other._prefix, Path)
573
+ and self._prefix is not None
574
+ and self._prefix != other._prefix
575
+ ):
572
576
  raise ValueError(f"Add with prefix: {self} + {other}")
573
577
  # Prefix=True (relative) is OK
574
578
  other = other._data
@@ -607,6 +611,9 @@ class Path(Sequence[PathElem]):
607
611
  def __repr__(self):
608
612
  return f"P({str(self)!r})"
609
613
 
614
+ def __format__(self, spec):
615
+ return str(self).__format__(spec)
616
+
610
617
  @classmethod
611
618
  def from_str(cls, path, *, mark="", scan=False):
612
619
  """
@@ -1103,7 +1110,7 @@ class PathLongener:
1103
1110
  Caution: this longener ignores path marks.
1104
1111
  """
1105
1112
 
1106
- cls = Path
1113
+ cls: type[Path] = Path
1107
1114
 
1108
1115
  def __init__(self, prefix: Path | PathTuple = ()):
1109
1116
  if isinstance(prefix, Path):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moat-lib-path
3
- Version: 0.3.1
3
+ Version: 0.3.3
4
4
  Summary: Hierarchical path representation and manipulation for MoaT
5
5
  Maintainer-email: Matthias Urlichs <matthias@urlichs.de>
6
6
  Project-URL: homepage, https://m-o-a-t.org
File without changes
File without changes
File without changes
File without changes