Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node type 'NamedExpr': No transformation for the node #83

Open
markb-trustifi opened this issue Sep 3, 2024 · 1 comment
Open

Node type 'NamedExpr': No transformation for the node #83

markb-trustifi opened this issue Sep 3, 2024 · 1 comment

Comments

@markb-trustifi
Copy link

markb-trustifi commented Sep 3, 2024

I have such python code:

if (info := _getMsgClassInfo(classType))[0]:
   if info[1]:
      raise UnsupportedMSGTypeError(f'Support for MSG type "{ct}" has been refused. See {constants.REPOSITORY_URL}/issues/{info[1]} for more information.')
   raise UnsupportedMSGTypeError(f'MSG type "{ct}" currently is not supported by the module. If you would like support, please make a feature request.')

Where _getMsgClassInfo is some class.
When I translate it with PJ I get this error:
TransformationError: Node type 'NamedExpr': Line: 173, column: 12. No transformation for the node
When I replace ":=" with "=", I get this error:
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='? (<unknown>, line 173)

@azazel75
Copy link
Collaborator

azazel75 commented Sep 3, 2024

The first error is because the walrus operator isn't supported yet, the second is because it's just invalid in plain Python

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants