string-to-code 0.2.12__py3-none-any.whl → 0.2.14__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.
string_to_code/core.py CHANGED
@@ -3,11 +3,10 @@ core functions of the string_to_code module
3
3
  """
4
4
 
5
5
  import typing
6
- import collections.abc
7
6
  import random
8
7
  import functools
9
8
 
10
- Strings: typing.TypeAlias = typing.List[str]
9
+ Strings: typing.TypeAlias = list[str]
11
10
 
12
11
 
13
12
  class Atom(typing.NamedTuple):
@@ -26,13 +25,13 @@ class SimpleFunction(typing.NamedTuple):
26
25
  other functions of such type or displaying single characters
27
26
  """
28
27
 
29
- called_list: typing.List[CalledListEntry]
28
+ called_list: list[CalledListEntry]
30
29
 
31
30
 
32
- SimpleFunctions: typing.TypeAlias = typing.List[SimpleFunction]
31
+ SimpleFunctions: typing.TypeAlias = list[SimpleFunction]
33
32
 
34
33
 
35
- def str_pieces(in_str: str, in_pieces_len: typing.List[int]) -> Strings:
34
+ def str_pieces(in_str: str, in_pieces_len: list[int]) -> Strings:
36
35
  """returns in_str split into pieces of lengths as in in_pieces_len"""
37
36
  assert all(_ > 0 for _ in in_pieces_len)
38
37
  assert sum(in_pieces_len) == len(in_str)
@@ -45,7 +44,7 @@ def str_pieces(in_str: str, in_pieces_len: typing.List[int]) -> Strings:
45
44
  return res
46
45
 
47
46
 
48
- def random_pieces_len(in_total_len: int) -> typing.List[int]:
47
+ def random_pieces_len(in_total_len: int) -> list[int]:
49
48
  """returns a list of positive numbers with their sum being in_total_len"""
50
49
  cur_num = in_total_len
51
50
  res = []
@@ -73,7 +72,7 @@ def _interesting_random_split(in_str: str) -> Strings:
73
72
 
74
73
  def get_function_namer(
75
74
  in_name_prefix: str = "f_",
76
- ) -> collections.abc.Callable[[int], str]:
75
+ ) -> typing.Callable[[int], str]:
77
76
  """returns a default function namer"""
78
77
 
79
78
  def _inner(in_id: int) -> str:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: string-to-code
3
- Version: 0.2.12
3
+ Version: 0.2.14
4
4
  Summary: Generates a piece of messy code in a given language displaying a given string
5
5
  Home-page: https://github.com/vil02/string_to_code_proj
6
6
  License: MIT
@@ -12,6 +12,8 @@ Classifier: License :: OSI Approved :: MIT License
12
12
  Classifier: Programming Language :: Python :: 3
13
13
  Classifier: Programming Language :: Python :: 3.10
14
14
  Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
15
17
  Project-URL: Repository, https://github.com/vil02/string_to_code_proj
16
18
  Description-Content-Type: text/markdown
17
19
 
@@ -1,7 +1,7 @@
1
1
  string_to_code/README.md,sha256=A8BkDQpr-Os630YfGnaU-i_kigyVB8bNLhvLfIyzQR8,1225
2
2
  string_to_code/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  string_to_code/c_like_utils.py,sha256=C_mEQbq8fy-pbsPrnLOTGrWFG6UpA8G2yE2LytFTQR0,2378
4
- string_to_code/core.py,sha256=V3qLK_rWYcpeRWUw0WQyzesyYzphj53IMKkOmSgliFs,4336
4
+ string_to_code/core.py,sha256=i-0kDPLMykun32-FkGN8gAgA2-T6PSNkJELOz-RGAJ4,4269
5
5
  string_to_code/string_to_code.py,sha256=q0IyBfeDeDI2SCwlBOM_hwHdBfF1YQ7gn642o6cHU94,1290
6
6
  string_to_code/to_ada.py,sha256=gihr2fg0_cbH-oT2BamkF9GA1u4ktKWGiGFAzxTsDyY,2337
7
7
  string_to_code/to_algol68.py,sha256=RPBQcA3UaEHtj0fxsscYpJy7ZpY-3ZSvChmaLzXb8n8,1707
@@ -18,7 +18,7 @@ string_to_code/to_pascal.py,sha256=ZwOJgi3saoNP2_H7ZWpQykPg8c-jP-L8eOw_Zz2q8uc,1
18
18
  string_to_code/to_python3.py,sha256=BJwjyhRB2IBOE3-xwkkMV3vZU-e2xreppYBKQeA1whg,1589
19
19
  string_to_code/to_rust.py,sha256=hTCjlortLhR7FwsBgbrFRcwXpKWA6ed2UYnz1OK8R7I,1926
20
20
  string_to_code/utils.py,sha256=-B9dvRWUzHQh3-g7xGyK4yGY06l8EEDgaK0l3XMagLY,3775
21
- string_to_code-0.2.12.dist-info/LICENSE,sha256=LQrcSkcUyN1FtFYDxWK05puxNN9o2q8PV-_2SwFDTWc,1068
22
- string_to_code-0.2.12.dist-info/METADATA,sha256=Oneb_LYGixlQ3m5Bg39q9G3oET1ELf7K_PKEEwCOZnI,1857
23
- string_to_code-0.2.12.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
24
- string_to_code-0.2.12.dist-info/RECORD,,
21
+ string_to_code-0.2.14.dist-info/LICENSE,sha256=LQrcSkcUyN1FtFYDxWK05puxNN9o2q8PV-_2SwFDTWc,1068
22
+ string_to_code-0.2.14.dist-info/METADATA,sha256=H842rAyfHCrXVvqWmLrpU3tWHOWY930ObxJSNtM9_OA,1959
23
+ string_to_code-0.2.14.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
24
+ string_to_code-0.2.14.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.7.0
2
+ Generator: poetry-core 1.9.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any