string-to-code 0.5.0__tar.gz → 0.5.1__tar.gz
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-0.5.0 → string_to_code-0.5.1}/PKG-INFO +6 -4
- {string_to_code-0.5.0 → string_to_code-0.5.1}/pyproject.toml +12 -12
- {string_to_code-0.5.0 → string_to_code-0.5.1}/string_to_code/c_like_utils.py +1 -2
- {string_to_code-0.5.0 → string_to_code-0.5.1}/string_to_code/core.py +4 -4
- {string_to_code-0.5.0 → string_to_code-0.5.1}/string_to_code/to_ada.py +1 -3
- {string_to_code-0.5.0 → string_to_code-0.5.1}/string_to_code/to_algol68.py +1 -3
- {string_to_code-0.5.0 → string_to_code-0.5.1}/string_to_code/to_ballerina.py +2 -11
- {string_to_code-0.5.0 → string_to_code-0.5.1}/string_to_code/to_bash.py +1 -3
- {string_to_code-0.5.0 → string_to_code-0.5.1}/string_to_code/to_c.py +1 -3
- {string_to_code-0.5.0 → string_to_code-0.5.1}/string_to_code/to_cobol.py +1 -3
- {string_to_code-0.5.0 → string_to_code-0.5.1}/string_to_code/to_cpp.py +1 -3
- {string_to_code-0.5.0 → string_to_code-0.5.1}/string_to_code/to_fortran90.py +1 -3
- {string_to_code-0.5.0 → string_to_code-0.5.1}/string_to_code/to_haskell.py +1 -3
- {string_to_code-0.5.0 → string_to_code-0.5.1}/string_to_code/to_java.py +2 -10
- {string_to_code-0.5.0 → string_to_code-0.5.1}/string_to_code/to_kotlin.py +1 -3
- {string_to_code-0.5.0 → string_to_code-0.5.1}/string_to_code/to_lisp.py +1 -3
- {string_to_code-0.5.0 → string_to_code-0.5.1}/string_to_code/to_lua.py +1 -2
- {string_to_code-0.5.0 → string_to_code-0.5.1}/string_to_code/to_nim.py +1 -4
- {string_to_code-0.5.0 → string_to_code-0.5.1}/string_to_code/to_pascal.py +1 -4
- {string_to_code-0.5.0 → string_to_code-0.5.1}/string_to_code/to_python3.py +1 -3
- {string_to_code-0.5.0 → string_to_code-0.5.1}/string_to_code/to_rust.py +1 -4
- {string_to_code-0.5.0 → string_to_code-0.5.1}/string_to_code/utils.py +1 -0
- {string_to_code-0.5.0 → string_to_code-0.5.1}/LICENSE +0 -0
- {string_to_code-0.5.0 → string_to_code-0.5.1}/string_to_code/README.md +0 -0
- {string_to_code-0.5.0 → string_to_code-0.5.1}/string_to_code/__init__.py +0 -0
- {string_to_code-0.5.0 → string_to_code-0.5.1}/string_to_code/string_to_code.py +1 -1
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: string-to-code
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.1
|
|
4
4
|
Summary: Generates a piece of messy code in a given language displaying a given string
|
|
5
5
|
License: MIT
|
|
6
|
+
License-File: LICENSE
|
|
6
7
|
Keywords: code-generation
|
|
7
8
|
Author: piotr.idzik
|
|
8
9
|
Author-email: vil02@o2.pl
|
|
9
|
-
Requires-Python: >=3.
|
|
10
|
+
Requires-Python: >=3.11,<4.0.0
|
|
10
11
|
Classifier: License :: OSI Approved :: MIT License
|
|
11
12
|
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.11
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.12
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
16
18
|
Project-URL: Repository, https://github.com/vil02/string_to_code_proj
|
|
17
19
|
Description-Content-Type: text/markdown
|
|
18
20
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "string-to-code"
|
|
3
|
-
version = "0.5.
|
|
3
|
+
version = "0.5.1"
|
|
4
4
|
description = "Generates a piece of messy code in a given language displaying a given string "
|
|
5
5
|
authors = ["piotr.idzik <vil02@o2.pl>"]
|
|
6
6
|
readme = "./string_to_code/README.md"
|
|
@@ -10,22 +10,22 @@ repository = "https://github.com/vil02/string_to_code_proj"
|
|
|
10
10
|
keywords = ["code-generation"]
|
|
11
11
|
|
|
12
12
|
[tool.poetry.dependencies]
|
|
13
|
-
python = ">=3.
|
|
13
|
+
python = ">=3.11,<4.0.0"
|
|
14
14
|
|
|
15
15
|
[tool.poetry.group.dev]
|
|
16
16
|
optional = true
|
|
17
17
|
|
|
18
18
|
[tool.poetry.group.dev.dependencies]
|
|
19
|
-
pytest = "
|
|
20
|
-
pytest-mock = "3.
|
|
21
|
-
pylint = "
|
|
22
|
-
flake8 = "7.
|
|
23
|
-
flake8-pytest-style = "2.
|
|
24
|
-
ruff = "0.
|
|
25
|
-
coverage = "7.
|
|
26
|
-
black = "
|
|
27
|
-
mypy = "
|
|
28
|
-
bandit = "1.
|
|
19
|
+
pytest = "9.2.0"
|
|
20
|
+
pytest-mock = "3.17.0"
|
|
21
|
+
pylint = "4.1.4"
|
|
22
|
+
flake8 = "7.5.0"
|
|
23
|
+
flake8-pytest-style = "2.2.0"
|
|
24
|
+
ruff = "0.17.6"
|
|
25
|
+
coverage = "7.17.5"
|
|
26
|
+
black = "26.10.1"
|
|
27
|
+
mypy = "2.4.1"
|
|
28
|
+
bandit = "1.9.4"
|
|
29
29
|
xenon = "0.9.3"
|
|
30
30
|
|
|
31
31
|
[build-system]
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
core functions of the string_to_code module
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
-
import typing
|
|
6
|
-
import random
|
|
7
5
|
import functools
|
|
6
|
+
import random
|
|
7
|
+
import typing
|
|
8
8
|
|
|
9
9
|
Strings: typing.TypeAlias = list[str]
|
|
10
10
|
|
|
@@ -83,10 +83,10 @@ def get_function_namer(
|
|
|
83
83
|
|
|
84
84
|
def _prepare_printer_program(
|
|
85
85
|
in_str: str,
|
|
86
|
-
) ->
|
|
86
|
+
) -> tuple[InitialCall, SimpleFunctions]:
|
|
87
87
|
needed_functions: SimpleFunctions = []
|
|
88
88
|
|
|
89
|
-
@functools.
|
|
89
|
+
@functools.cache
|
|
90
90
|
def _generate_code(in_str: str) -> CalledListEntry:
|
|
91
91
|
if len(in_str) == 1:
|
|
92
92
|
return Atom(in_str)
|
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
provides string_to_ballereina utilities
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
-
from . import core
|
|
6
|
-
from . import utils
|
|
7
|
-
from . import c_like_utils
|
|
8
|
-
|
|
5
|
+
from . import c_like_utils, core, utils
|
|
9
6
|
|
|
10
7
|
_get_function_name = utils.get_function_name_fun("fun_")
|
|
11
8
|
|
|
@@ -53,13 +50,7 @@ def _main_call_to_code(in_initial_call, **kwargs):
|
|
|
53
50
|
if in_initial_call is not None
|
|
54
51
|
else ""
|
|
55
52
|
)
|
|
56
|
-
return ""
|
|
57
|
-
[
|
|
58
|
-
"public function main() {\n",
|
|
59
|
-
initial_call_str,
|
|
60
|
-
"}",
|
|
61
|
-
]
|
|
62
|
-
)
|
|
53
|
+
return f"public function main() {{\n{initial_call_str}}}"
|
|
63
54
|
|
|
64
55
|
|
|
65
56
|
def _join_to_final(main_call, function_definitions, **_kwargs):
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
provides string_to_java utilities
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
-
from . import utils
|
|
6
|
-
from . import c_like_utils
|
|
7
|
-
|
|
5
|
+
from . import c_like_utils, utils
|
|
8
6
|
|
|
9
7
|
_get_function_name = utils.get_function_name_fun("fun")
|
|
10
8
|
|
|
@@ -45,13 +43,7 @@ def _main_call_to_code(in_initial_call, **kwargs):
|
|
|
45
43
|
if in_initial_call is not None
|
|
46
44
|
else " "
|
|
47
45
|
)
|
|
48
|
-
return ""
|
|
49
|
-
[
|
|
50
|
-
" public static void main(String[] args) {\n",
|
|
51
|
-
initial_call_str,
|
|
52
|
-
"}",
|
|
53
|
-
]
|
|
54
|
-
)
|
|
46
|
+
return f" public static void main(String[] args) {{\n{initial_call_str}}}"
|
|
55
47
|
|
|
56
48
|
|
|
57
49
|
def _join_to_final(main_call, function_definitions, **kwargs):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|