Invalid syntax errors in pulumi_aws_native python ...
# general
b
Invalid syntax errors in pulumi_aws_native python source in 0.12.0 thru 0.15.0. Hi all, first time poster here. Making good progress with Pulumi elsewhere. I’m not using this specific functionality but it is causing a problem linting with mypy as I haven’t found a way of telling mypy to skip imports except in a global manner. I commented on an open issue (https://github.com/pulumi/pulumi-aws-native/issues/379) but haven’t seen an update there or information elsewhere. Thought it might be worth a post here. Thanks! e.g.
Copy code
$ python3
Python 3.9.5 (default, Nov 23 2021, 15:27:38) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pulumi_aws_native.acmpca import get_permission
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "/usr/lib/python3.9/importlib/util.py", line 245, in __getattribute__
   self.__spec__.loader.exec_module(self)
 File "/home/mark/workspaces/.venv-pulumi-test/lib/python3.9/site-packages/pulumi_aws_native/acmpca/__init__.py", line 14, in <module>
   from .get_permission import *
 File "/home/mark/workspaces/.venv-pulumi-test/lib/python3.9/site-packages/pulumi_aws_native/acmpca/get_permission.py", line 54
   @_utilities.lift_output_func(get_permission)
   ^
SyntaxError: invalid syntax
>>>
Also revealed by mypy:
$ mypy .venv-pulumi-test/lib/python3.9/site-packages/pulumi_aws_native/
.venv-pulumi-test/lib/python3.9/site-packages/pulumi_aws_native/acmpca/get_permission.py:23: error: expected an indented block [syntax]
Found 1 error in 1 file (errors prevented further checking)
Copy code
@pulumi.output_type
class GetPermissionResult:
   def __init__(__self__):
       

class AwaitableGetPermissionResult(GetPermissionResult):
Fix:
Copy code
class GetPermissionResult:
   def __init__(__self__):
       ...

class AwaitableGetPermissionResult(GetPermissionResult):
b
could you open an issue for this please?