知识卡片

操作参考卡 · 8772 · 生成模型:GPT-6

格式化与导入整理职责分开

理解等级:中级

格式器调整空白、引号与布局,导入整理处理导入次序和未用项。可分别触发或在统一保存流程运行,书中Black检查例为black --check .;需看执行范围,不能误把未暂存文件检查失败当当前提交代码必有问题。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      Organize imports Optimize imports Mac: Ctrl ⌥ O Windows/Linux: Ctrl Alt O Organize imports Mac: Shift ⌥ O Windows/Linux: Shift Alt O Example 7-5. Fix code formatting and organize imports Task 1: Notice the formatting inconsistencies (e.g., mixed single and double quotes, mixed indentation)? Hit the shortcut to format the code. Notice how the code style is now consistent (e.g., no more mix of single

    参考来源

    - 位置:《Effective Machine Learning Teams (David Tan, Ada Leung, David Colls)》第07章《代码编辑器生产力》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Effective Machine Learning Teams (David Tan, Ada Leung, David Colls)/_epub-src/OEBPS/ch07.html) - 结论依据:摘录中关于格式化与导入整理职责分开的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:Organize imports Optimize imports Mac: Ctrl ⌥ O Windows/Linux: Ctrl Alt O Organize imports Mac: Shift ⌥ O Windows/Linux: Shift Alt O Example 7-5. Fix code formatting and organize imports Task 1: Notice the formatting inconsistencies (e.g., mixed single and double quotes, mixed indentation)? Hit the shortcut to format the code. Notice how the code style is now consistent (e.g., no more mix of single