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

bug: Unpacking operator * used in list gives an error #215

Open
GindaChen opened this issue Jul 25, 2022 · 2 comments
Open

bug: Unpacking operator * used in list gives an error #215

GindaChen opened this issue Jul 25, 2022 · 2 comments

Comments

@GindaChen
Copy link

Version: 0.9.2

Test Case:

from redbaron import RedBaron
RedBaron("[*[1,2,3]]")]

gives the following error:

ParsingError: Error, got an unexpected token STAR here:

   1 [*<---- here

The token STAR should be one of those: BACKQUOTE, BINARY, BINARY_RAW_STRING, BINARY_STRING, COMPLEX, ELLIPSIS, FLOAT, FLOAT_EXPONANT, FLOAT_EXPONANT_COMPLEX, HEXA, INT, INTERPOLATED_RAW_STRING, INTERPOLATED_STRING, LAMBDA, LEFT_BRACKET, LEFT_PARENTHESIS, LEFT_SQUARE_BRACKET, LONG, MINUS, NAME, NOT, OCTA, PLUS, RAW_STRING, RIGHT_SQUARE_BRACKET, STRING, TILDE, UNICODE_RAW_STRING, UNICODE_STRING

Baron has failed to parse this input. If this is valid python code (and by that I mean that the python binary successfully parse this code without any syntax error) (also consider that baron does not yet parse python 3 code integrally) it would be kind if you can extract a snippet of your code that make Baron fails and open a bug here: https://github.com/PyCQA/baron/issues

Sorry for the inconvenience.
@GindaChen GindaChen changed the title bug: Unpacking operator * using in list gives an error bug: Unpacking operator * used in list gives an error Jul 25, 2022
@sebor255
Copy link

sebor255 commented Aug 8, 2023

The bug still persists.

Version 0.9.2

Code:

def run_app_with_args(exePath, appArgs):
    if isinstance(appArgs, str): appArgs = [x.lstrip() for x in appArgs.split(",")]
    app = subprocess.Popen([exePath, *appArgs], shell=True)

The error:

Error, got an unexpected token STAR here:
app = subprocess.Popen([exePath, *<---- here

@liquidmetal
Copy link

I ran into the same error today.

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

3 participants