最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

debugging - How to delete unused files and lines from a python project? - Stack Overflow

programmeradmin7浏览0评论

So, I am using multiple github repos in order to build a new application that uses parts of all these projects/repos. I came to a point that I reached my goal for my application and I would like to delete all unused files and if possible lines of code I am not using at all from those repos (Not talking about installed packages). How can I do this?

For instance, let's say that I am using two repos repo1 and repo2.
In my main application I have a line that says from repo1 import r1_x1, r1_x2 and from repo2 import r2_x1. But r1_x1, r1_x2 and r2_x1 have also imports from other files in their respective projects.

I would like to keep only those files that are actually used when I run my application. (And if possible keep only those lines that are actually used) Is there any already existing method/application/script for this?

This can be extended as if I have a single project but build so many subfolders and files and I would like to keep only those that are actually used (Excluding installed packages).

发布评论

评论列表(0)

  1. 暂无评论