python-ex
简介
本插件旨在帮助开发者检测 Python 代码中的潜在问题,包括 for 循环变量名冲突、模块名称冲突、未调用父类初始化方法、未使用的导入以及颜色值的快速选择。通过实时诊断和快速修复功能,提升代码质量和开发效率。
This plugin is designed to help developers detect potential issues in Python code, such as for loop variable name conflicts, module name conflicts, missing parent class initialization calls, unused imports, and quick color selection for color values. It provides real-time diagnostics and quick fixes to improve code quality and development efficiency.
功能
检测 for 循环变量名冲突
检查 for 循环的变量名是否与函数参数名重复,并给出中文警告(波浪线提示)。
Detects if the variable name in a for loop conflicts with function parameters and provides a warning (wavy underline).
检测模块名称冲突
检测当前文件中是否存在与类同名的模块导入,并给出警告。
Checks for module imports that have the same name as a class in the file and provides a warning.
检测未调用父类初始化方法
检测类是否未调用父类初始化方法(super().__init__() ),并提供快速修复选项。
Detects if a class does not call the parent class's initialization method (super().__init__() ) and provides a quick fix option.
检测未使用的导入
检测当前文件中是否存在未使用的模块导入,并给出警告。
Checks for unused module imports in the file and provides a warning.
取色器功能
提供一个内置的取色器工具,支持从屏幕任意位置吸取颜色,并将颜色值插入到代码中。支持以下所有颜色格式:
- RGB 格式(例如
(255, 136, 0) )
- HEX 格式(例如
#FF8800 )
- rgba() 格式(例如
rgba(255, 136, 0, 1) )
- 带前缀的括号表示法(如
rgb(255, 136, 0) )
- 无前缀的括号表示法(如
(255, 136, 0) )
Includes a built-in color picker tool that allows you to pick colors from anywhere on the screen and insert them into your code. Supports all of the following color formats:
- RGB format (e.g.,
(255, 136, 0) )
- HEX format (e.g.,
#FF8800 )
- rgba() format (e.g.,
rgba(255, 136, 0, 1) )
- Parenthetical notation with prefix (e.g.,
rgb(255, 136, 0) )
- Parenthetical notation without prefix (e.g.,
(255, 136, 0) )
插件仓库描述
欢迎访问 python-ex 插件的官方仓库!本插件专为 Python 开发者设计,旨在通过实时诊断和快速修复功能,帮助开发者检测并解决代码中的潜在问题。插件支持的功能包括:
- 检测 for 循环变量名冲突
- 检测模块名称冲突
- 检测未调用父类初始化方法
- 检测未使用的导入
- 提供内置取色器工具,支持多种颜色格式
本插件致力于提升 Python 开发者的编码效率和代码质量。如果您在使用过程中遇到任何问题或有改进建议,请随时提交 Issue 或 Pull Request。
感谢您对 python-ex 插件的支持!
使用方法
Requirements
- 本插件依赖 Python 环境,请确保您的系统已安装 Python。如果未安装,插件将无法正常工作。
Known Issues
- 如果系统未安装 Python,插件将无法正常运行,请确保已安装 Python 并将其添加到系统环境变量中。
Release Notes
1.0.0
Initial release of ...
1.0.1
Fixed issue #.
1.1.0
Added features X, Y, and Z.
| |