diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index 085b1146e..55b42a312 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -19,10 +19,14 @@ env: jobs: check: - name: Check Python (3.10) + name: Check Python (${{ matrix.python-version }}) runs-on: ubuntu-latest env: - PYTHON_VERSION: '3.10' + PYTHON_VERSION: ${{ matrix.python-version }} + + strategy: + matrix: + python-version: [ '3.10', '3.12' ] steps: - uses: actions/checkout@v4 diff --git a/guppylang/cfg/builder.py b/guppylang/cfg/builder.py index 593165e5d..ab5175280 100644 --- a/guppylang/cfg/builder.py +++ b/guppylang/cfg/builder.py @@ -259,12 +259,7 @@ def visit_FunctionDef( cfg, func_ty, docstring=docstring, - name=node.name, - args=node.args, - body=node.body, - decorator_list=node.decorator_list, - returns=node.returns, - type_comment=node.type_comment, + **dict(ast.iter_fields(node)), ) set_location_from(new_node, node) bb.statements.append(new_node)