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

Pysa unable to use models with special characters / reserved keywords #899

Open
giusepperaffa opened this issue Jul 25, 2024 · 0 comments
Open

Comments

@giusepperaffa
Copy link

I have been trying to use Pysa (Ubuntu 20.04 + virtual environment + Python 3.8) to perform the data flow analysis of repositories with folders' names containing:

  • The dash character (-). While the latter cannot be used in Python identifiers, it is frequently part of folders' names for readability reasons.
  • The reserved Python keyword lambda. Folders named lambda are sometimes used in repositories containing serverless applications developed for the AWS lambda platform.

Pysa generally requires fully qualified names in its models, which implies that the dash character as well as the word lambda end up being included in such models. When this happens though, Pysa throws a syntax error, presumably because it processes the models by using the Python identifiers' rules.

The obvious solution would be to edit the problematic folders' names or to avoid using the dash character and the word lambda altogether. However, I am currently analysing a dataset of repositories authored by others, and I would not be inclined to modify them in order to avoid inconsistencies.

I would appreciate if someone could tell me whether there is either a workaround to this issue or a Pysa configuration option that can be helpful in these cases.

Thank you very much.

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

1 participant