-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
AST parser for setup.py files doesn't map comparisons or BoolOps #207
Labels
bug
Something isn't working
Comments
techalchemy
added a commit
that referenced
this issue
Mar 11, 2020
- Fix handling of `ast.binOp` nodes during unmapping of `setup.py` files when parsing -- add mapping for all binary operators and execute translated functions using the unparsed left and right hand sides of the binary operator - Add equivalent handling for `ast.Compare` types - Add `importlib.import_module` attempts to `ast.Compare` evaluations when encountering `ast.Attribute` types on either side of the comparison - Add handling for `ast.IfExp` type to evaluate truth values of the expression and return `node.body` if the expression is `True`, otherwise `node.orelse` - Add equivalence mapping for `ast.Ellipsis` type which becomes `ast.Constant` in python `>= 3.8` - Fixes #204 - Fixes #206 - Fixes #207 Signed-off-by: Dan Ryan <[email protected]>
techalchemy
added a commit
that referenced
this issue
Mar 11, 2020
- Fix handling of `ast.binOp` nodes during unmapping of `setup.py` files when parsing -- add mapping for all binary operators and execute translated functions using the unparsed left and right hand sides of the binary operator - Add equivalent handling for `ast.Compare` types - Add `importlib.import_module` attempts to `ast.Compare` evaluations when encountering `ast.Attribute` types on either side of the comparison - Add handling for `ast.IfExp` type to evaluate truth values of the expression and return `node.body` if the expression is `True`, otherwise `node.orelse` - Add equivalence mapping for `ast.Ellipsis` type which becomes `ast.Constant` in python `>= 3.8` - Fixes #204 - Fixes #206 - Fixes #207 Signed-off-by: Dan Ryan <[email protected]>
techalchemy
added a commit
that referenced
this issue
Mar 31, 2020
- Fix handling of `ast.binOp` nodes during unmapping of `setup.py` files when parsing -- add mapping for all binary operators and execute translated functions using the unparsed left and right hand sides of the binary operator - Add equivalent handling for `ast.Compare` types - Add `importlib.import_module` attempts to `ast.Compare` evaluations when encountering `ast.Attribute` types on either side of the comparison - Add handling for `ast.IfExp` type to evaluate truth values of the expression and return `node.body` if the expression is `True`, otherwise `node.orelse` - Add equivalence mapping for `ast.Ellipsis` type which becomes `ast.Constant` in python `>= 3.8` - Fixes #204 - Fixes #206 - Fixes #207 Signed-off-by: Dan Ryan <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The AST parser fails to perform comparisons or boolean operations due to a lack of any mapping from the ast to equivalent functions, which can lead to half-parsed lists for
install_requires
as in, for instance,azure-storage==0.36.0
, which contains the following:The conditional expression fails to parse, yielding an unusable result
The text was updated successfully, but these errors were encountered: