v440 2.0.0.dev57__tar.gz → 2.0.0.dev58__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.
Files changed (34) hide show
  1. {v440-2.0.0.dev57/src/v440.egg-info → v440-2.0.0.dev58}/PKG-INFO +1 -1
  2. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/pyproject.toml +1 -1
  3. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440/_utils/VList.py +2 -2
  4. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440/_utils/utils.py +2 -3
  5. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440/core/Local.py +2 -2
  6. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440/tests/test_version.py +0 -11
  7. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440/tests/testdata.toml +4 -0
  8. {v440-2.0.0.dev57 → v440-2.0.0.dev58/src/v440.egg-info}/PKG-INFO +1 -1
  9. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/LICENSE.txt +0 -0
  10. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/MANIFEST.in +0 -0
  11. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/README.rst +0 -0
  12. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/setup.cfg +0 -0
  13. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440/__init__.py +0 -0
  14. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440/_utils/BaseList.py +0 -0
  15. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440/_utils/Cfg.py +0 -0
  16. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440/_utils/Digest.py +0 -0
  17. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440/_utils/Pattern.py +0 -0
  18. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440/_utils/SlotList.py +0 -0
  19. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440/_utils/__init__.py +0 -0
  20. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440/_utils/cfg.toml +0 -0
  21. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440/_utils/qualparse.py +0 -0
  22. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440/core/Base.py +0 -0
  23. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440/core/Public.py +0 -0
  24. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440/core/Qual.py +0 -0
  25. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440/core/Release.py +0 -0
  26. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440/core/Version.py +0 -0
  27. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440/core/VersionError.py +0 -0
  28. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440/core/__init__.py +0 -0
  29. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440/tests/__init__.py +0 -0
  30. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440/tests/test_testdata.py +0 -0
  31. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440.egg-info/SOURCES.txt +0 -0
  32. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440.egg-info/dependency_links.txt +0 -0
  33. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440.egg-info/requires.txt +0 -0
  34. {v440-2.0.0.dev57 → v440-2.0.0.dev58}/src/v440.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: v440
3
- Version: 2.0.0.dev57
3
+ Version: 2.0.0.dev58
4
4
  Summary: This project provides mutable version objects in accordance with PEP440.
5
5
  Author-email: Johannes <johannes.programming@gmail.com>
6
6
  License: The MIT License (MIT)
@@ -36,7 +36,7 @@ keywords = []
36
36
  name = "v440"
37
37
  readme = "README.rst"
38
38
  requires-python = ">=3.11"
39
- version = "2.0.0.dev57"
39
+ version = "2.0.0.dev58"
40
40
 
41
41
  [project.license]
42
42
  file = "LICENSE.txt"
@@ -62,7 +62,7 @@ class VList(BaseList):
62
62
  data.append(value)
63
63
  self.data = data
64
64
 
65
- def clear(self: Self, /) -> None:
65
+ def clear(self: Self) -> None:
66
66
  "This method clears the data."
67
67
  self.data = ()
68
68
 
@@ -90,7 +90,7 @@ class VList(BaseList):
90
90
  self.data = data
91
91
  return ans
92
92
 
93
- def remove(self: Self, value: Any) -> None:
93
+ def remove(self: Self, value: Any, /) -> None:
94
94
  "This method removes the first occurence of value."
95
95
  data: list = list(self.data)
96
96
  data.remove(value)
@@ -1,7 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import functools
4
- import operator
5
4
  import string
6
5
  from typing import *
7
6
 
@@ -22,7 +21,7 @@ def numeral(value: Any, /) -> int:
22
21
  v: Any = segment(value)
23
22
  if type(v) is int:
24
23
  return v
25
- e = "%r is not a valid numeral segment"
24
+ e: str = "%r is not a valid numeral segment"
26
25
  e %= v
27
26
  raise VersionError(e)
28
27
 
@@ -31,7 +30,7 @@ def segment(value: Any, /) -> Any:
31
30
  try:
32
31
  return _segment(value)
33
32
  except:
34
- e = "%r is not a valid segment"
33
+ e: str = "%r is not a valid segment"
35
34
  e = VersionError(e % value)
36
35
  raise e from None
37
36
 
@@ -61,12 +61,12 @@ class Local(VList):
61
61
  return ".".join(map(str, self))
62
62
 
63
63
  @classmethod
64
- def _sort(cls: type, value: Any) -> tuple[bool, Any]:
64
+ def _sort(cls: type, value: Any) -> tuple[bool, int | str]:
65
65
  return type(value) is int, value
66
66
 
67
67
  @property
68
68
  @setdoc.basic
69
- def data(self: Self) -> list[int | str]:
69
+ def data(self: Self) -> tuple[int | str]:
70
70
  return self._data
71
71
 
72
72
  @data.setter
@@ -424,16 +424,5 @@ class TestDevNoGo(unittest.TestCase):
424
424
  self.assertIsNone(v.public.qual.dev)
425
425
 
426
426
 
427
- class TestVersionSpecifiersNoGo(unittest.TestCase):
428
-
429
- def test_version_with_invalid_specifiers(self: Self) -> None:
430
- # Test version with invalid specifiers that should raise an error
431
- with self.assertRaises(VersionError):
432
- Version("1.2.3--4")
433
-
434
- with self.assertRaises(VersionError):
435
- Version("1.2.3a1--4")
436
-
437
-
438
427
  if __name__ == "__main__":
439
428
  unittest.main()
@@ -742,6 +742,10 @@ Post-releases = [
742
742
  "1.0.0+build@sha.123",
743
743
  "1.0.0++local.version.doubleplus",
744
744
  ]
745
+ "Test version with invalid specifiers that should raise an error" = [
746
+ "1.2.3--4",
747
+ "1.2.3a1--4",
748
+ ]
745
749
 
746
750
  [devint.test_dev_as_int]
747
751
  v_version = "1.2.3"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: v440
3
- Version: 2.0.0.dev57
3
+ Version: 2.0.0.dev58
4
4
  Summary: This project provides mutable version objects in accordance with PEP440.
5
5
  Author-email: Johannes <johannes.programming@gmail.com>
6
6
  License: The MIT License (MIT)
File without changes
File without changes
File without changes
File without changes