python-hcl2 4.3.2__tar.gz → 4.3.4__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.2 → python-hcl2-4.3.4}/.github/workflows/codeql-analysis.yml +4 -4
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/.github/workflows/pr_check.yml +1 -1
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/CHANGELOG.md +6 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/MANIFEST.in +1 -1
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/PKG-INFO +3 -3
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/README.md +1 -2
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/hcl2/hcl2.lark +3 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/hcl2/transformer.py +8 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/hcl2/version.py +2 -2
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/pyproject.toml +1 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/python_hcl2.egg-info/PKG-INFO +3 -3
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/test-requirements.txt +1 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/tox.ini +4 -3
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/.codacy.yml +0 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/.coveragerc +0 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/.github/CODEOWNERS +0 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/.github/workflows/publish.yml +0 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/.gitignore +0 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/.pre-commit-config.yaml +0 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/.yamllint.yml +0 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/LICENSE +0 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/bin/terraform_test +0 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/hcl2/__init__.py +0 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/hcl2/__main__.py +0 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/hcl2/api.py +0 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/hcl2/parser.py +0 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/hcl2/py.typed +0 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/mypy.ini +0 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/pylintrc +0 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/python_hcl2.egg-info/SOURCES.txt +0 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/python_hcl2.egg-info/dependency_links.txt +0 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/python_hcl2.egg-info/entry_points.txt +0 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/python_hcl2.egg-info/not-zip-safe +0 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/python_hcl2.egg-info/requires.txt +0 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/python_hcl2.egg-info/top_level.txt +0 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/reports/.gitignore +0 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/requirements.txt +0 -0
- {python-hcl2-4.3.2 → python-hcl2-4.3.4}/setup.cfg +0 -0
|
@@ -17,7 +17,7 @@ jobs:
|
|
|
17
17
|
|
|
18
18
|
steps:
|
|
19
19
|
- name: Checkout repository
|
|
20
|
-
uses: actions/checkout@
|
|
20
|
+
uses: actions/checkout@v4
|
|
21
21
|
with:
|
|
22
22
|
# We must fetch at least the immediate parents so that if this is
|
|
23
23
|
# a pull request then we can checkout the head.
|
|
@@ -25,7 +25,7 @@ jobs:
|
|
|
25
25
|
|
|
26
26
|
# Initializes the CodeQL tools for scanning.
|
|
27
27
|
- name: Initialize CodeQL
|
|
28
|
-
uses: github/codeql-action/init@
|
|
28
|
+
uses: github/codeql-action/init@v3
|
|
29
29
|
# Override language selection by uncommenting this and choosing your languages
|
|
30
30
|
# with:
|
|
31
31
|
# languages: go, javascript, csharp, python, cpp, java
|
|
@@ -33,7 +33,7 @@ jobs:
|
|
|
33
33
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
|
34
34
|
# If this step fails, then you should remove it and run the build manually (see below)
|
|
35
35
|
- name: Autobuild
|
|
36
|
-
uses: github/codeql-action/autobuild@
|
|
36
|
+
uses: github/codeql-action/autobuild@v3
|
|
37
37
|
|
|
38
38
|
# ℹ️ Command-line programs to run using the OS shell.
|
|
39
39
|
# 📚 https://git.io/JvXDl
|
|
@@ -47,4 +47,4 @@ jobs:
|
|
|
47
47
|
# make release
|
|
48
48
|
|
|
49
49
|
- name: Perform CodeQL Analysis
|
|
50
|
-
uses: github/codeql-action/analyze@
|
|
50
|
+
uses: github/codeql-action/analyze@v3
|
|
@@ -13,7 +13,7 @@ jobs:
|
|
|
13
13
|
runs-on: ubuntu-22.04
|
|
14
14
|
strategy:
|
|
15
15
|
matrix:
|
|
16
|
-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
|
|
16
|
+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
|
|
17
17
|
steps:
|
|
18
18
|
- uses: actions/checkout@master
|
|
19
19
|
- name: Set up Python ${{ matrix.python-version }}
|
|
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## \[4.3.3\] - 2024-03-27
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Support for Python 3.12 ([#153](https://github.com/amplify-education/python-hcl2/pull/153))
|
|
13
|
+
|
|
8
14
|
## \[4.3.2\] - 2023-05-24
|
|
9
15
|
|
|
10
16
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-hcl2
|
|
3
|
-
Version: 4.3.
|
|
3
|
+
Version: 4.3.4
|
|
4
4
|
Summary: A parser for HCL2
|
|
5
5
|
Author-email: Amplify Education <github@amplify.com>
|
|
6
6
|
License: MIT
|
|
@@ -17,12 +17,12 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.9
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
21
|
Requires-Python: >=3.7.0
|
|
21
22
|
Description-Content-Type: text/markdown
|
|
22
23
|
License-File: LICENSE
|
|
23
24
|
|
|
24
|
-
[](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)
|
|
26
26
|
[](https://travis-ci.org/amplify-education/python-hcl2)
|
|
27
27
|
[](https://raw.githubusercontent.com/amplify-education/python-hcl2/master/LICENSE)
|
|
28
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/)
|
|
@@ -27,6 +27,7 @@ expr_term : "(" new_line_or_comment? expression new_line_or_comment? ")"
|
|
|
27
27
|
| index_expr_term
|
|
28
28
|
| get_attr_expr_term
|
|
29
29
|
| identifier
|
|
30
|
+
| provider_function_call
|
|
30
31
|
| heredoc_template
|
|
31
32
|
| heredoc_template_trim
|
|
32
33
|
| attr_splat_expr_term
|
|
@@ -55,6 +56,8 @@ heredoc_template_trim : /<<-(?P<heredoc_trim>[a-zA-Z][a-zA-Z0-9._-]+)\n(?:.|\n)*
|
|
|
55
56
|
|
|
56
57
|
function_call : identifier "(" new_line_or_comment? arguments? new_line_or_comment? ")"
|
|
57
58
|
arguments : (expression (new_line_or_comment* "," new_line_or_comment* expression)* ("," | "...")? new_line_or_comment*)
|
|
59
|
+
colons: "::"
|
|
60
|
+
provider_function_call: identifier colons identifier colons identifier "(" new_line_or_comment? arguments? new_line_or_comment? ")"
|
|
58
61
|
|
|
59
62
|
index_expr_term : expr_term index
|
|
60
63
|
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
|
|
|
@@ -21,6 +21,7 @@ classifiers = [
|
|
|
21
21
|
"Programming Language :: Python :: 3.9",
|
|
22
22
|
"Programming Language :: Python :: 3.10",
|
|
23
23
|
"Programming Language :: Python :: 3.11",
|
|
24
|
+
"Programming Language :: Python :: 3.12",
|
|
24
25
|
]
|
|
25
26
|
requires-python = ">=3.7.0"
|
|
26
27
|
dependencies = ["lark>=1,<2"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-hcl2
|
|
3
|
-
Version: 4.3.
|
|
3
|
+
Version: 4.3.4
|
|
4
4
|
Summary: A parser for HCL2
|
|
5
5
|
Author-email: Amplify Education <github@amplify.com>
|
|
6
6
|
License: MIT
|
|
@@ -17,12 +17,12 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.9
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
21
|
Requires-Python: >=3.7.0
|
|
21
22
|
Description-Content-Type: text/markdown
|
|
22
23
|
License-File: LICENSE
|
|
23
24
|
|
|
24
|
-
[](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)
|
|
26
26
|
[](https://travis-ci.org/amplify-education/python-hcl2)
|
|
27
27
|
[](https://raw.githubusercontent.com/amplify-education/python-hcl2/master/LICENSE)
|
|
28
28
|
[](https://pypi.org/project/python-hcl2/)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[tox]
|
|
2
|
-
envlist={py37}-unit,{py38}-unit,{py39}-unit,{py310}-unit,{py311}-unit
|
|
2
|
+
envlist={py37}-unit,{py38}-unit,{py39}-unit,{py310}-unit,{py311}-unit,{py312}-unit
|
|
3
3
|
skipsdist=true
|
|
4
4
|
|
|
5
5
|
[gh-actions]
|
|
@@ -9,10 +9,11 @@ python =
|
|
|
9
9
|
3.9: py39-unit
|
|
10
10
|
3.10: py310-unit
|
|
11
11
|
3.11: py311-unit
|
|
12
|
+
3.12: py312-unit
|
|
12
13
|
|
|
13
14
|
[testenv]
|
|
14
15
|
commands =
|
|
15
|
-
pip install --upgrade -r
|
|
16
|
+
pip install --upgrade -r test-requirements.txt .
|
|
16
17
|
nose2 --config tox.ini --verbose
|
|
17
18
|
coverage xml -o reports/coverage.xml --omit=hcl2/lark_parser.py
|
|
18
19
|
|
|
@@ -22,7 +23,7 @@ whitelist_externals=rm
|
|
|
22
23
|
passenv = TERRAFORM_CONFIG
|
|
23
24
|
basepython=python3.7
|
|
24
25
|
commands =
|
|
25
|
-
pip install --upgrade -r
|
|
26
|
+
pip install --upgrade -r test-requirements.txt -e .
|
|
26
27
|
rm -f hcl2/lark_parser.py
|
|
27
28
|
python bin/terraform_test {posargs}
|
|
28
29
|
|
|
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
|