Is there a good dependency analysis tool for Python?(Python有没有好的依赖分析工具?)
问题描述
依赖分析程序通过控制代码中模块之间的依赖关系来帮助我们组织代码.当一个模块是另一个模块的循环依赖时,找到一种方法将其转换为单向依赖或将两个模块合并为一个模块是一个线索.
Dependency analysis programs help us organize code by controlling the dependencies between modules in our code. When one module is a circular dependency of another module, it is a clue to find a way to turn that into a unidirectional dependency or merge two modules into one module.
Python代码最好的依赖分析工具是什么?
What is the best dependency analysis tool for Python code?
推荐答案
我推荐使用 snakefood 来创建图形Python 项目的依赖关系图.它可以很好地检测依赖关系,以便立即查看需要重构的区域.如果您阅读一些文档,它的用法非常简单.
I recommend using snakefood for creating graphical dependency graphs of Python projects. It detects dependencies nicely enough to immediately see areas for refactorisation. Its usage is pretty straightforward if you read a little bit of documentation.
当然,您可以省略图形创建步骤,而是在文件中接收依赖字典.
Of course, you can omit the graph-creation step and receive a dependency dictionary in a file instead.
这篇关于Python有没有好的依赖分析工具?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Python有没有好的依赖分析工具?


基础教程推荐
- 筛选NumPy数组 2022-01-01
- 线程时出现 msgbox 错误,GUI 块 2022-01-01
- 使用PyInstaller后在Windows中打开可执行文件时出错 2022-01-01
- Python kivy 入口点 inflateRest2 无法定位 libpng16-16.dll 2022-01-01
- 用于分类数据的跳跃记号标签 2022-01-01
- 在 Python 中,如果我在一个“with"中返回.块,文件还会关闭吗? 2022-01-01
- 如何让 python 脚本监听来自另一个脚本的输入 2022-01-01
- 如何在海运重新绘制中自定义标题和y标签 2022-01-01
- 何时使用 os.name、sys.platform 或 platform.system? 2022-01-01
- Dask.array.套用_沿_轴:由于额外的元素([1]),使用dask.array的每一行作为另一个函数的输入失败 2022-01-01