jmux 0.0.1__py3-none-any.whl → 0.0.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.
jmux/demux.py CHANGED
@@ -421,7 +421,9 @@ class JMux(ABC):
421
421
  case None:
422
422
  match self._pda.state:
423
423
  case S.START:
424
- if ch in OBJECT_OPEN:
424
+ if is_json_whitespace(ch):
425
+ pass
426
+ elif ch in OBJECT_OPEN:
425
427
  self._pda.push(M.ROOT)
426
428
  self._pda.set_state(S.EXPECT_KEY)
427
429
  else:
@@ -432,13 +434,16 @@ class JMux(ABC):
432
434
  "JSON must start with '{' character.",
433
435
  )
434
436
  case S.END:
435
- raise ObjectAlreadyClosedError(
436
- object_name=self.__class__.__name__,
437
- message=(
438
- "Cannot feed more characters to closed JMux "
439
- f"object, got '{ch}'"
440
- ),
441
- )
437
+ if is_json_whitespace(ch):
438
+ pass
439
+ else:
440
+ raise ObjectAlreadyClosedError(
441
+ object_name=self.__class__.__name__,
442
+ message=(
443
+ "Cannot feed more characters to closed JMux "
444
+ f"object, got '{ch}'"
445
+ ),
446
+ )
442
447
  case _:
443
448
  raise UnexpectedStateError(
444
449
  self._pda.stack,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jmux
3
- Version: 0.0.1
3
+ Version: 0.0.2
4
4
  Summary: JMux: A Python package for demultiplexing a JSON string into multiple awaitable variables.
5
5
  Author-email: "Johannes A.I. Unruh" <johannes@unruh.ai>
6
6
  License: MIT License
@@ -1,13 +1,13 @@
1
1
  jmux/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  jmux/awaitable.py,sha256=gceBygIf3fAIWLsN1lWxsz9ExWNasDuk1WaGz8d9FAc,8427
3
3
  jmux/decoder.py,sha256=Y6KVryRDLvGV5nBsneXpTvC0WUGhR5Z89Dvqz4HMAgg,1562
4
- jmux/demux.py,sha256=ouhu2PIJkaEIsToNfDhJWGQYjFYULjqFSEX5ElmAjPs,34861
4
+ jmux/demux.py,sha256=7YJBD_EGUyxjiwjVnKCZOA-NrpXWrTe_y2Eitl4EU3E,35089
5
5
  jmux/error.py,sha256=VZJYivt8RPfjcF2bs-T7_UkH3dVA3xH-xGbZggQV14k,4665
6
6
  jmux/helpers.py,sha256=6y33RohUGVvGGaAREyRQTmEWfgV4w295SyqDwIMnUNs,1982
7
7
  jmux/pda.py,sha256=81gnh0eWGsgd_SrHkqjRQy_KkOSlBf5nor7pqKGgYjw,791
8
8
  jmux/types.py,sha256=V63wMx1I7l_P83JAqzOQ7H7B-xKrNUuGshJ3NjKsdeQ,1192
9
- jmux-0.0.1.dist-info/licenses/LICENSE,sha256=y0qnwaAe4bEqzNPyq4M_VZA2I2mQly8MawajyZhqw0k,1169
10
- jmux-0.0.1.dist-info/METADATA,sha256=Y4E3GeCPbNYvUv6B877m_c7DZUXlZO5voWCbxXVtwSg,13330
11
- jmux-0.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
12
- jmux-0.0.1.dist-info/top_level.txt,sha256=TF2N6kHqLghfOkCiNlCueMDX4l5rPn_5MSPNtYrS1-o,5
13
- jmux-0.0.1.dist-info/RECORD,,
9
+ jmux-0.0.2.dist-info/licenses/LICENSE,sha256=y0qnwaAe4bEqzNPyq4M_VZA2I2mQly8MawajyZhqw0k,1169
10
+ jmux-0.0.2.dist-info/METADATA,sha256=G3PPpw0VhSYx9YyeVUT9T12YCGxORI7HVFAQYTB4Od4,13330
11
+ jmux-0.0.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
12
+ jmux-0.0.2.dist-info/top_level.txt,sha256=TF2N6kHqLghfOkCiNlCueMDX4l5rPn_5MSPNtYrS1-o,5
13
+ jmux-0.0.2.dist-info/RECORD,,
File without changes