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

In any function if import some module next line it automatically add extra space #144

Open
rakaseth opened this issue Nov 18, 2022 · 0 comments

Comments

@rakaseth
Copy link

Hi team,

Using pyminifier to obfuscate the python code.But in any function if i have import statement it is by default adding one extra space in next coming line.
Example:

def deploy_model(self, poll_timeout=300):
    from zenml.integrations.seldon.model_deployers.seldon_model_deployer import (
        SeldonModelDeployer as modelDeployer
    )
    model_deployer = cast(
        modelDeployer, modelDeployer.get_active_model_deployer()
    )

After obfuscate the code:
def mWIJzelPyDpGMgsinKEUaSACrYBufoHQctwNkLxqhdVFbROvXT(mWIJzelPyDpGMgsinKEUaSACrYBufoHQctwNkLxqhdVFbRTOvj,poll_timeout=300):
from zenml.integrations.seldon.model_deployers.seldon_model_deployer import(mWIJzelPyDpGMgsinKEUaSACrYBufoHQctwNkLxqhdVFbROjTX as modelDeployer)
mWIJzelPyDpGMgsinKEUaSACrYBufoHQctwNkLxqhdVFbROjXT=modelDeployer.get_active_model_deployer

if we notice line start with 'from' and with 'mWIJ' has indentation issue.

i have ran command:
pyminifier -O --replacement-length=50 --outfile filename.py filename.py

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