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

Multiple file obfuscation creates code with identation error #146

Open
sylvainmouretfico opened this issue Feb 16, 2023 · 0 comments
Open

Comments

@sylvainmouretfico
Copy link

sylvainmouretfico commented Feb 16, 2023

Hey,
I have a very simple example, where the result is not proper Python code.

Here are the steps to reproduce.

main.py

import sub
sub.doSomething()

sub.py

def doSomething():
    print("test")
$ pyminifier --version
2.1
$ pyminifier -d out -O *.py
$ cd out
$ python main.py
Traceback (most recent call last):
  File "xxx\out\main.py", line 1, in <module>
    import sub
  File "xxx\out\sub.py", line 2
    i=print
    ^
IndentationError: expected an indented block after function definition on line 1

Result:

main.py

import sub
D=sub.D
D()

sub.py

def D():
i=print
 i("test")`

Note that the line i=print is not properly indented.

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