omlish 0.0.0.dev320__py3-none-any.whl → 0.0.0.dev322__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.
- omlish/__about__.py +2 -2
- omlish/collections/bimap.py +7 -7
- {omlish-0.0.0.dev320.dist-info → omlish-0.0.0.dev322.dist-info}/METADATA +1 -1
- {omlish-0.0.0.dev320.dist-info → omlish-0.0.0.dev322.dist-info}/RECORD +8 -8
- {omlish-0.0.0.dev320.dist-info → omlish-0.0.0.dev322.dist-info}/WHEEL +1 -1
- {omlish-0.0.0.dev320.dist-info → omlish-0.0.0.dev322.dist-info}/entry_points.txt +0 -0
- {omlish-0.0.0.dev320.dist-info → omlish-0.0.0.dev322.dist-info}/licenses/LICENSE +0 -0
- {omlish-0.0.0.dev320.dist-info → omlish-0.0.0.dev322.dist-info}/top_level.txt +0 -0
omlish/__about__.py
CHANGED
omlish/collections/bimap.py
CHANGED
@@ -47,6 +47,9 @@ class _BaseBiMapImpl(BiMap[K, V], lang.Abstract):
|
|
47
47
|
def __iter__(self):
|
48
48
|
return iter(self._dct)
|
49
49
|
|
50
|
+
def __repr__(self) -> str:
|
51
|
+
return f'BiMap({self._dct!r})'
|
52
|
+
|
50
53
|
|
51
54
|
class _BiMapImpl(_BaseBiMapImpl[K, V]):
|
52
55
|
def __init__(self, *args, **kwargs) -> None:
|
@@ -54,13 +57,10 @@ class _BiMapImpl(_BaseBiMapImpl[K, V]):
|
|
54
57
|
inv_dct: dict[V, K] = {}
|
55
58
|
for k, v in lang.yield_dict_init(*args, **kwargs):
|
56
59
|
check.not_in(k, dct)
|
57
|
-
check.not_in(v,
|
60
|
+
check.not_in(v, inv_dct)
|
58
61
|
dct[k] = v
|
59
62
|
inv_dct[v] = k
|
60
63
|
|
61
|
-
self._dct = dct
|
62
|
-
self._inv_dct = inv_dct
|
63
|
-
|
64
64
|
super().__init__(dct, _BiMapImpl._Inverse(inv_dct, self))
|
65
65
|
|
66
66
|
class _Inverse(_BaseBiMapImpl):
|
@@ -71,17 +71,17 @@ class _BiMapImpl(_BaseBiMapImpl[K, V]):
|
|
71
71
|
|
72
72
|
|
73
73
|
@ta.overload
|
74
|
-
def make_bi_map(
|
74
|
+
def make_bi_map(**kwargs: V) -> BiMap[V, str]:
|
75
75
|
...
|
76
76
|
|
77
77
|
|
78
78
|
@ta.overload
|
79
|
-
def make_bi_map(
|
79
|
+
def make_bi_map(dct: ta.Mapping[K, V]) -> BiMap[K, V]:
|
80
80
|
...
|
81
81
|
|
82
82
|
|
83
83
|
@ta.overload
|
84
|
-
def make_bi_map(
|
84
|
+
def make_bi_map(items: ta.Iterable[tuple[K, V]]) -> BiMap[K, V]:
|
85
85
|
...
|
86
86
|
|
87
87
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
omlish/.manifests.json,sha256=orgsRvtpHu8tdhaCvlP9v3P495OJopYYiHKjK68WtWg,8587
|
2
|
-
omlish/__about__.py,sha256=
|
2
|
+
omlish/__about__.py,sha256=xvE66viCLRgMN4JRp0qs48KVusRHLQ1V2C0oXPnPKEE,3478
|
3
3
|
omlish/__init__.py,sha256=SsyiITTuK0v74XpKV8dqNaCmjOlan1JZKrHQv5rWKPA,253
|
4
4
|
omlish/c3.py,sha256=rer-TPOFDU6fYq_AWio_AmA-ckZ8JDY5shIzQ_yXfzA,8414
|
5
5
|
omlish/cached.py,sha256=MLap_p0rdGoDIMVhXVHm1tsbcWobJF0OanoodV03Ju8,542
|
@@ -78,7 +78,7 @@ omlish/codecs/standard.py,sha256=eiZ4u9ep0XrA4Z_D1zJI0vmWyuN8HLrX4Se_r_Cq_ZM,60
|
|
78
78
|
omlish/codecs/text.py,sha256=JzrdwMpQPo2NBBg3K1EZszzQy5vEWmd82SIerJd4yeQ,5723
|
79
79
|
omlish/collections/__init__.py,sha256=7r4qY9paGL-pC8ZNJn6taod9T2qAyMjIpcL7ptb8GaI,2394
|
80
80
|
omlish/collections/abc.py,sha256=ikTJlJ5dhXjU6tlNsI0Wm0_7GaIEpe3mftpvdGY_nc8,2620
|
81
|
-
omlish/collections/bimap.py,sha256=
|
81
|
+
omlish/collections/bimap.py,sha256=3szDCscPJlFRtkpyVQNWneg4s50mr6Rd0jdTzVEIcnE,1661
|
82
82
|
omlish/collections/coerce.py,sha256=tAls15v_7p5bUN33R7Zbko87KW5toWHl9fRialCqyNY,7030
|
83
83
|
omlish/collections/errors.py,sha256=shcS-NCnEUudF8qC_SmO2TQyjivKlS4TDjaz_faqQ0c,44
|
84
84
|
omlish/collections/frozen.py,sha256=LMbAHYDENIQk1hvjCTvpnx66m1TalrHa4CSn8n_tsXQ,4142
|
@@ -856,9 +856,9 @@ omlish/typedvalues/holder.py,sha256=ZTnHiw-K38ciOBLEdwgrltr7Xp8jjEs_0Lp69DH-G-o,
|
|
856
856
|
omlish/typedvalues/marshal.py,sha256=hWHRLcrGav7lvXJDtb9bNI0ickl4SKPQ6F4BbTpqw3A,4219
|
857
857
|
omlish/typedvalues/reflect.py,sha256=Ih1YgU-srUjsvBn_P7C66f73_VCvcwqE3ffeBnZBgt4,674
|
858
858
|
omlish/typedvalues/values.py,sha256=ym46I-q2QJ_6l4UlERqv3yj87R-kp8nCKMRph0xQ3UA,1307
|
859
|
-
omlish-0.0.0.
|
860
|
-
omlish-0.0.0.
|
861
|
-
omlish-0.0.0.
|
862
|
-
omlish-0.0.0.
|
863
|
-
omlish-0.0.0.
|
864
|
-
omlish-0.0.0.
|
859
|
+
omlish-0.0.0.dev322.dist-info/licenses/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
860
|
+
omlish-0.0.0.dev322.dist-info/METADATA,sha256=FKPjD1J9GGHjtPMCDE2S9jJyEjqo3kMwRDEDqe4W3pc,4416
|
861
|
+
omlish-0.0.0.dev322.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
862
|
+
omlish-0.0.0.dev322.dist-info/entry_points.txt,sha256=Lt84WvRZJskWCAS7xnQGZIeVWksprtUHj0llrvVmod8,35
|
863
|
+
omlish-0.0.0.dev322.dist-info/top_level.txt,sha256=pePsKdLu7DvtUiecdYXJ78iO80uDNmBlqe-8hOzOmfs,7
|
864
|
+
omlish-0.0.0.dev322.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|