funcnodes-basic 0.1.1__py3-none-any.whl → 0.1.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.
@@ -4,7 +4,7 @@ from .math import NODE_SHELF as math_shelf
4
4
  from .lists import NODE_SHELF as lists_shelf
5
5
  from .strings import NODE_SHELF as strings_shelf
6
6
 
7
- __version__ = "0.1.1"
7
+ __version__ = "0.1.2"
8
8
 
9
9
  NODE_SHELF = Shelf(
10
10
  nodes=[],
@@ -549,8 +549,19 @@ def string_isascii(s: str) -> bool:
549
549
  {"name": "encoded"},
550
550
  ],
551
551
  )
552
- def string_encode(s: str, encoding: POSSIBLE_DECODINGS_TYPE = "utf-8") -> bytes:
553
- return s.encode(encoding)
552
+ def string_encode(
553
+ s: str,
554
+ encoding: POSSIBLE_DECODINGS_TYPE = "utf-8",
555
+ errors: Literal[
556
+ "strict",
557
+ "replace",
558
+ "ignore",
559
+ "xmlcharrefreplace",
560
+ "backslashreplace",
561
+ "namereplace",
562
+ ] = "replace",
563
+ ) -> bytes:
564
+ return s.encode(encoding, errors)
554
565
 
555
566
 
556
567
  @fn.NodeDecorator(
@@ -561,8 +572,19 @@ def string_encode(s: str, encoding: POSSIBLE_DECODINGS_TYPE = "utf-8") -> bytes:
561
572
  {"name": "decoded"},
562
573
  ],
563
574
  )
564
- def string_decode(b: bytes, encoding: POSSIBLE_DECODINGS_TYPE = "utf-8") -> str:
565
- return b.decode(encoding)
575
+ def string_decode(
576
+ b: bytes,
577
+ encoding: POSSIBLE_DECODINGS_TYPE = "utf-8",
578
+ errors: Literal[
579
+ "strict",
580
+ "replace",
581
+ "ignore",
582
+ "xmlcharrefreplace",
583
+ "backslashreplace",
584
+ "namereplace",
585
+ ] = "replace",
586
+ ) -> str:
587
+ return b.decode(encoding, errors)
566
588
 
567
589
 
568
590
  @fn.NodeDecorator(
@@ -702,6 +724,8 @@ NODE_SHELF = fn.Shelf(
702
724
  string_concat,
703
725
  string_split,
704
726
  string_join,
727
+ string_encode,
728
+ string_decode,
705
729
  string_upper,
706
730
  string_lower,
707
731
  string_replace,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: funcnodes-basic
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Basic functionalities for funcnodes
5
5
  Author: Julian Kimmig
6
6
  Author-email: julian.kimmig@gmx.net
@@ -0,0 +1,8 @@
1
+ funcnodes_basic/__init__.py,sha256=tNR7s8n_tDNUPe41kUK4F0bZ1XSyN7T1CU2GHPt8C8c,439
2
+ funcnodes_basic/lists.py,sha256=e0ym5OVZAPRm05gMKxullRspql0oIaHEh4RxXCUsVbE,1553
3
+ funcnodes_basic/logic.py,sha256=X1gHjQzhGYYFJwV0Y-L0Cty3CD-w6UWbcax72JWmGoM,3577
4
+ funcnodes_basic/math.py,sha256=9kYKXCH1f8lXvuxiUJnTORUp29rYrjmi24Di71toiDE,11280
5
+ funcnodes_basic/strings.py,sha256=t89-YUgptDb06DZq9UiOcfCWpOWbfWVbYNwXlalD_y4,16203
6
+ funcnodes_basic-0.1.2.dist-info/METADATA,sha256=WxUte40KpVbJPi4h7pUT8jPRqZu4LO8nHtJeW2ZdbSg,432
7
+ funcnodes_basic-0.1.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
8
+ funcnodes_basic-0.1.2.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- funcnodes_basic/__init__.py,sha256=XWfNAxnVXLrY1GF3L7CbQsbBCZ8CU5Re_FhMJmAIUkY,439
2
- funcnodes_basic/lists.py,sha256=e0ym5OVZAPRm05gMKxullRspql0oIaHEh4RxXCUsVbE,1553
3
- funcnodes_basic/logic.py,sha256=X1gHjQzhGYYFJwV0Y-L0Cty3CD-w6UWbcax72JWmGoM,3577
4
- funcnodes_basic/math.py,sha256=9kYKXCH1f8lXvuxiUJnTORUp29rYrjmi24Di71toiDE,11280
5
- funcnodes_basic/strings.py,sha256=q-4eP1FU7gtp2bploDB4vo9VBtfu67MZ6-KJDS8myB0,15769
6
- funcnodes_basic-0.1.1.dist-info/METADATA,sha256=WcniYk0CFeT3gg8KWK1ByXB94BNmhTem9cC-6toSogQ,432
7
- funcnodes_basic-0.1.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
8
- funcnodes_basic-0.1.1.dist-info/RECORD,,