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

Remove files from AST tree #333

Open
MartinBernstorff opened this issue Oct 16, 2023 · 1 comment
Open

Remove files from AST tree #333

MartinBernstorff opened this issue Oct 16, 2023 · 1 comment

Comments

@MartinBernstorff
Copy link

Thanks for an awesome tool! I have a use-case that I'm unsure if covered by the current implementation.

We're developing a python data-processing pipeline, consisting of a "library" and an "application" module.

Our test coverage is good so, technically, almost all of the library is not "dead". But I would like to know whether there are parts of the library which is not used in any part of the application, so I can remove it.

I tried specifying the --ignore flag, but it seems that it only ignores errors from the ignored files, it doesn't exclude them from the AST. Is this correct, and is there any way of excluding them from the AST?

@RJ722
Copy link
Contributor

RJ722 commented Oct 21, 2023

The --exclude flag does what you're looking for. I'm assuming you mean --ignore-names or --ignore-decorators by ignore flag, which behave in the way you described.

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

2 participants