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

ignore-init setting is not working from command line call #263

Closed
Tracked by #271
cgl opened this issue Nov 7, 2022 · 6 comments · Fixed by #295
Closed
Tracked by #271

ignore-init setting is not working from command line call #263

cgl opened this issue Nov 7, 2022 · 6 comments · Fixed by #295
Assignees
Labels
bug Something isn't working changelog Changes should be written to the changelog file. test
Milestone

Comments

@cgl
Copy link

cgl commented Nov 7, 2022

ignore-init setting dit not work for me from command line call.

$ unimport --remove --ignore-init --gitignore
Refactoring 'docs/conf.py'
Refactoring 'src/tests/unit/common/vendors/xoserve/fixtures/__init__.py'
Refactoring 'src/tests/unit/common/vendors/centrelink/test_client.py'
Refactoring 'src/tests/unit/common/plugins/clients/oe/stubs/__init__.py'

unimport==0.12.1
Python 3.10.6

@hakancelikdev hakancelikdev self-assigned this Dec 5, 2022
@hakancelikdev hakancelikdev added bug Something isn't working changelog Changes should be written to the changelog file. test labels Dec 5, 2022
@hakancelikdev hakancelikdev added this to the 0.1.0 milestone Dec 5, 2022
@hakancelikdev
Copy link
Owner

Thanks for the issue, I will work on it.

@hakancelikdev hakancelikdev mentioned this issue Dec 5, 2022
9 tasks
@hakancelikdev
Copy link
Owner

@cgl does this issue still exist?

@hakancelikdev
Copy link
Owner

hakancelikdev commented Feb 3, 2023

can you try like this

unimport --check --ignore-init

@hogklint
Copy link

Hi,

Yes, I still see this issue on 0.16.0. But it's only a problem together with --gitignore

$ echo "import re" > __init__.py
$ unimport --check --ignore-init
Emoji.STAR Congratulations there is no unused import in your project. Emoji.STAR
$ unimport --check --ignore-init --gitignore
re at __init__.py:1

@hakancelikdev
Copy link
Owner

@Nomme Can I see the .gitignore file

@hogklint
Copy link

@hakancelikdev The above commands were run in an empty directory. So the file didn't exist. I get the same problem with an empty .gitignore, or if I have some basic line in it e.g. build/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working changelog Changes should be written to the changelog file. test
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants