aws-cloudformation / cloudformation-cli-python-plugin

The CloudFormation Provider Development Toolkit Python Plugin allows you to autogenerate Python code based on an input schema.
Apache License 2.0
108 stars 47 forks source link

Python 3.9 mypy failures #139

Closed johnttompkins closed 1 year ago

johnttompkins commented 3 years ago

Following errors are thrown from MyPI when checking the support lib on python 3.9. To get this functional for 3.9 need to address:

mypy.....................................................................Failed
- hook id: mypy
- exit code: 2

src/cloudformation_cli_python_lib/interface.py:12: error: syntax error in type comment
src/cloudformation_cli_python_lib/interface.py:61: error: syntax error in type comment
src/cloudformation_cli_python_lib/interface.py:75: error: syntax error in type comment
src/cloudformation_cli_python_lib/interface.py:80: error: syntax error in type comment
src/cloudformation_cli_python_lib/interface.py:81: error: syntax error in type comment
src/cloudformation_cli_python_lib/interface.py:90: error: syntax error in type comment
src/cloudformation_cli_python_lib/interface.py:92: error: syntax error in type comment
src/cloudformation_cli_python_lib/interface.py:94: error: syntax error in type comment
src/cloudformation_cli_python_lib/interface.py:95: error: syntax error in type comment
src/cloudformation_cli_python_lib/interface.py:96: error: syntax error in type comment
src/cloudformation_cli_python_lib/interface.py:98: error: syntax error in type comment
src/cloudformation_cli_python_lib/interface.py:122: error: syntax error in type comment
src/cloudformation_cli_python_lib/interface.py:131: error: syntax error in type comment
src/cloudformation_cli_python_lib/interface.py:132: error: syntax error in type comment
src/cloudformation_cli_python_lib/interface.py:133: error: syntax error in type comment
src/cloudformation_cli_python_lib/interface.py:134: error: syntax error in type comment
src/cloudformation_cli_python_lib/interface.py:135: error: syntax error in type comment
src/cloudformation_cli_python_lib/interface.py:136: error: syntax error in type comment
src/cloudformation_cli_python_lib/interface.py:137: error: syntax error in type comment
src/cloudformation_cli_python_lib/interface.py:138: error: syntax error in type comment
src/cloudformation_cli_python_lib/interface.py:139: error: syntax error in type comment
src/cloudformation_cli_python_lib/interface.py:140: error: syntax error in type comment
src/cloudformation_cli_python_lib/interface.py:141: error: syntax error in type comment
src/cloudformation_cli_python_lib/interface.py:142: error: syntax error in type comment
PatMyron commented 3 years ago

maybe related to https://github.com/python/mypy/issues/8614? we need to update this at least: https://github.com/aws-cloudformation/cloudformation-cli-python-plugin/blob/ae8533f5a375883023969e9c19436c042d8721df/.pre-commit-config.yaml#L51-L52

mmaeng commented 1 year ago

206 looks to resolve the mypy errors on Python 3.9 and 3.10