python-hcl2 4.3.3__tar.gz → 4.3.5__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.
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/MANIFEST.in +1 -1
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/PKG-INFO +2 -3
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/README.md +1 -2
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/hcl2/hcl2.lark +8 -1
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/hcl2/transformer.py +8 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/hcl2/version.py +2 -2
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/python_hcl2.egg-info/PKG-INFO +2 -3
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/.codacy.yml +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/.coveragerc +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/.github/CODEOWNERS +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/.github/workflows/codeql-analysis.yml +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/.github/workflows/pr_check.yml +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/.github/workflows/publish.yml +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/.gitignore +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/.pre-commit-config.yaml +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/.yamllint.yml +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/CHANGELOG.md +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/LICENSE +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/bin/terraform_test +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/hcl2/__init__.py +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/hcl2/__main__.py +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/hcl2/api.py +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/hcl2/parser.py +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/hcl2/py.typed +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/mypy.ini +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/pylintrc +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/pyproject.toml +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/python_hcl2.egg-info/SOURCES.txt +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/python_hcl2.egg-info/dependency_links.txt +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/python_hcl2.egg-info/entry_points.txt +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/python_hcl2.egg-info/not-zip-safe +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/python_hcl2.egg-info/requires.txt +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/python_hcl2.egg-info/top_level.txt +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/reports/.gitignore +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/requirements.txt +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/setup.cfg +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/test-requirements.txt +0 -0
- {python-hcl2-4.3.3 → python-hcl2-4.3.5}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-hcl2
|
|
3
|
-
Version: 4.3.
|
|
3
|
+
Version: 4.3.5
|
|
4
4
|
Summary: A parser for HCL2
|
|
5
5
|
Author-email: Amplify Education <github@amplify.com>
|
|
6
6
|
License: MIT
|
|
@@ -22,8 +22,7 @@ Requires-Python: >=3.7.0
|
|
|
22
22
|
Description-Content-Type: text/markdown
|
|
23
23
|
License-File: LICENSE
|
|
24
24
|
|
|
25
|
-
[](https://www.codacy.com/gh/amplify-education/python-hcl2/dashboard?utm_source=github.com&utm_medium=referral&utm_content=amplify-education/python-hcl2&utm_campaign=Badge_Coverage)
|
|
25
|
+
[](https://app.codacy.com/gh/amplify-education/python-hcl2/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
|
|
27
26
|
[](https://travis-ci.org/amplify-education/python-hcl2)
|
|
28
27
|
[](https://raw.githubusercontent.com/amplify-education/python-hcl2/master/LICENSE)
|
|
29
28
|
[](https://pypi.org/project/python-hcl2/)
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
[](https://www.codacy.com/gh/amplify-education/python-hcl2/dashboard?utm_source=github.com&utm_medium=referral&utm_content=amplify-education/python-hcl2&utm_campaign=Badge_Coverage)
|
|
1
|
+
[](https://app.codacy.com/gh/amplify-education/python-hcl2/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
|
|
3
2
|
[](https://travis-ci.org/amplify-education/python-hcl2)
|
|
4
3
|
[](https://raw.githubusercontent.com/amplify-education/python-hcl2/master/LICENSE)
|
|
5
4
|
[](https://pypi.org/project/python-hcl2/)
|
|
@@ -5,7 +5,11 @@ block : identifier (identifier | STRING_LIT)* new_line_or_comment? "{" body "}"
|
|
|
5
5
|
new_line_and_or_comma: new_line_or_comment | "," | "," new_line_or_comment
|
|
6
6
|
new_line_or_comment: ( /\n/ | /#.*\n/ | /\/\/.*\n/ )+
|
|
7
7
|
|
|
8
|
-
identifier : /[a-zA-Z_][a-zA-Z0-9_-]*/
|
|
8
|
+
identifier : /[a-zA-Z_][a-zA-Z0-9_-]*/ | IN | FOR | IF | FOR_EACH
|
|
9
|
+
IF : "if"
|
|
10
|
+
IN : "in"
|
|
11
|
+
FOR : "for"
|
|
12
|
+
FOR_EACH : "for_each"
|
|
9
13
|
|
|
10
14
|
?expression : expr_term | operation | conditional
|
|
11
15
|
|
|
@@ -27,6 +31,7 @@ expr_term : "(" new_line_or_comment? expression new_line_or_comment? ")"
|
|
|
27
31
|
| index_expr_term
|
|
28
32
|
| get_attr_expr_term
|
|
29
33
|
| identifier
|
|
34
|
+
| provider_function_call
|
|
30
35
|
| heredoc_template
|
|
31
36
|
| heredoc_template_trim
|
|
32
37
|
| attr_splat_expr_term
|
|
@@ -55,6 +60,8 @@ heredoc_template_trim : /<<-(?P<heredoc_trim>[a-zA-Z][a-zA-Z0-9._-]+)\n(?:.|\n)*
|
|
|
55
60
|
|
|
56
61
|
function_call : identifier "(" new_line_or_comment? arguments? new_line_or_comment? ")"
|
|
57
62
|
arguments : (expression (new_line_or_comment* "," new_line_or_comment* expression)* ("," | "...")? new_line_or_comment*)
|
|
63
|
+
colons: "::"
|
|
64
|
+
provider_function_call: identifier colons identifier colons identifier "(" new_line_or_comment? arguments? new_line_or_comment? ")"
|
|
58
65
|
|
|
59
66
|
index_expr_term : expr_term index
|
|
60
67
|
get_attr_expr_term : expr_term get_attr
|
|
@@ -111,6 +111,14 @@ class DictTransformer(Transformer):
|
|
|
111
111
|
args_str = ", ".join([str(arg) for arg in args[1] if arg is not Discard])
|
|
112
112
|
return f"{args[0]}({args_str})"
|
|
113
113
|
|
|
114
|
+
def provider_function_call(self, args: List) -> str:
|
|
115
|
+
args = self.strip_new_line_tokens(args)
|
|
116
|
+
args_str = ""
|
|
117
|
+
if len(args) > 5:
|
|
118
|
+
args_str = ", ".join([str(arg) for arg in args[5] if arg is not Discard])
|
|
119
|
+
provider_func = "::".join([args[0], args[2], args[4]])
|
|
120
|
+
return f"{provider_func}({args_str})"
|
|
121
|
+
|
|
114
122
|
def arguments(self, args: List) -> List:
|
|
115
123
|
return args
|
|
116
124
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-hcl2
|
|
3
|
-
Version: 4.3.
|
|
3
|
+
Version: 4.3.5
|
|
4
4
|
Summary: A parser for HCL2
|
|
5
5
|
Author-email: Amplify Education <github@amplify.com>
|
|
6
6
|
License: MIT
|
|
@@ -22,8 +22,7 @@ Requires-Python: >=3.7.0
|
|
|
22
22
|
Description-Content-Type: text/markdown
|
|
23
23
|
License-File: LICENSE
|
|
24
24
|
|
|
25
|
-
[](https://www.codacy.com/gh/amplify-education/python-hcl2/dashboard?utm_source=github.com&utm_medium=referral&utm_content=amplify-education/python-hcl2&utm_campaign=Badge_Coverage)
|
|
25
|
+
[](https://app.codacy.com/gh/amplify-education/python-hcl2/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
|
|
27
26
|
[](https://travis-ci.org/amplify-education/python-hcl2)
|
|
28
27
|
[](https://raw.githubusercontent.com/amplify-education/python-hcl2/master/LICENSE)
|
|
29
28
|
[](https://pypi.org/project/python-hcl2/)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|