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

Stdout of unmodified script should be returned even if autoimport fails to resolve libraries #220

Closed
ghost opened this issue Sep 14, 2022 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@ghost
Copy link

ghost commented Sep 14, 2022

Description

I think autoimport should output the entire script even if it cannot resolve missing libraries. From what I can see, it doesn't output anything despite #131.

Steps to reproduce

  1. Use the following example:
#! /usr/bin/env python

plt.style.use('ggplot')
  1. Run cat example.py | autoimport -
  2. No response.

Current behavior

It doesn't return the unmodified script.

Desired behavior

I believe it should return the unmodified script.

Environment

╰─ → $ python -c "import autoimport.version; print(autoimport.version.version_info())"

           autoimport version: 1.2.2
               python version: 3.9.12 (main, Jun  1 2022, 11:38:51)  [GCC 7.5.0]
                     platform: Linux-5.18.3-051803-generic-x86_64-with-glibc2.35
@ghost ghost added the bug Something isn't working label Sep 14, 2022
@lyz-code
Copy link
Owner

Hi @rsmith31415, thanks for taking the time to open the issue. I agree with you that this is something that needs to be fixed. I'll work on it as soon as I can, if you want to jump ahead and implement the fix yourself, be my guest :).

I don't expect the implementation to be complicated

@lyz-code lyz-code added the good first issue Good for newcomers label Sep 14, 2022
@ghost
Copy link
Author

ghost commented Sep 14, 2022

#221 was a very simple change, but one test is failing. Should I use double quotes instead? Is that what the linter is complaining about?

UPDATE

Yes, that was the issue.

@lyz-code
Copy link
Owner

Thanks for the fix ^^, it's been released under 1.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant