typeid-python 0.3.0__py3-none-any.whl → 0.3.1__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 typeid-python might be problematic. Click here for more details.

typeid/typeid.py CHANGED
@@ -80,15 +80,14 @@ def from_uuid(suffix: uuid6.UUID, prefix: Optional[str] = None) -> TypeID:
80
80
 
81
81
 
82
82
  def get_prefix_and_suffix(string: str) -> tuple:
83
- parts = string.split("_")
84
- prefix = None
83
+ parts = string.rsplit("_", 1)
85
84
  if len(parts) == 1:
85
+ prefix = None
86
86
  suffix = parts[0]
87
- elif len(parts) == 2 and parts[0] != "":
88
- suffix = parts[1]
89
- prefix = parts[0]
90
- else:
87
+ elif len(parts) == 2 and parts[0] == "":
91
88
  raise InvalidTypeIDStringException(f"Invalid TypeID: {string}")
89
+ else:
90
+ prefix, suffix = parts
92
91
 
93
92
  return prefix, suffix
94
93
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: typeid-python
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: Python implementation of TypeIDs: type-safe, K-sortable, and globally unique identifiers inspired by Stripe IDs
5
5
  Home-page: https://github.com/akhundMurad/typeid-python
6
6
  License: MIT
@@ -18,7 +18,7 @@ Classifier: Programming Language :: Python :: 3.10
18
18
  Classifier: Programming Language :: Python :: 3.11
19
19
  Classifier: Programming Language :: Python :: 3.12
20
20
  Provides-Extra: cli
21
- Requires-Dist: uuid6 (>=2023.5.2,<2024.0.0)
21
+ Requires-Dist: uuid6 (>=2023.5.2)
22
22
  Project-URL: Repository, https://github.com/akhundMurad/typeid-python
23
23
  Description-Content-Type: text/markdown
24
24
 
@@ -3,9 +3,9 @@ typeid/base32.py,sha256=UTYXJjb95_nn-vYIpw7nquguBac4GZ0TL0oE6BuujPg,6504
3
3
  typeid/cli.py,sha256=h93_EAOzWO3bqubgL83Q-smHp11lvxMjgAunwyTWwFM,872
4
4
  typeid/constants.py,sha256=2ApV0agNys2yI9NM8oQZbyTR2rgP-VtxXGrM6glBB2Q,37
5
5
  typeid/errors.py,sha256=QPHZ-DJg5OpPOHtuetsqMCYu-E_aHMJZTTeFqx9Gz_4,207
6
- typeid/typeid.py,sha256=clwA9ADePwO9bXclAk1G6_-ASGchRLaFbOvaBIyeyMU,3009
6
+ typeid/typeid.py,sha256=6deYh-fDaJdcKjs14TVzMVNnfzsU2M9f_4FdqWnlNw4,2996
7
7
  typeid/validation.py,sha256=Cb9IkHrK1-HFukFYpSzyNGhllaF3MIZDcD5RnmsfrK8,910
8
- typeid_python-0.3.0.dist-info/LICENSE,sha256=f98oZ9FId4i3835UJYGw066BU8PSc57L1utGWS1ypcs,1070
9
- typeid_python-0.3.0.dist-info/METADATA,sha256=7kPAUATsQLMCKm5A1-fH49MrNh6qRyIuj8Frpl8_HTo,4124
10
- typeid_python-0.3.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
11
- typeid_python-0.3.0.dist-info/RECORD,,
8
+ typeid_python-0.3.1.dist-info/LICENSE,sha256=f98oZ9FId4i3835UJYGw066BU8PSc57L1utGWS1ypcs,1070
9
+ typeid_python-0.3.1.dist-info/METADATA,sha256=3b8dCEoGwAlMgk3GcDuh2j5IoDBCWAEtcVeMQcvk5kQ,4114
10
+ typeid_python-0.3.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
11
+ typeid_python-0.3.1.dist-info/RECORD,,