PyCharm 设置 Tabs and Indents

PyCharm 设置 Tabs and Indents

  • [1. Tabs and Indents](#1. Tabs and Indents)
  • [2. Show whitespaces](#2. Show whitespaces)
  • [3. Google Python Style Guide - 3.4 Indentation](#3. Google Python Style Guide - 3.4 Indentation)
  • References

1. Tabs and Indents

File -> Settings -> Editor -> Code Style -> Python

2. Show whitespaces

3. Google Python Style Guide - 3.4 Indentation

https://google.github.io/styleguide/pyguide.html

Indent your code blocks with 4 spaces.

Never use tabs. Implied line continuation should align wrapped elements vertically, or use a hanging 4-space indent. Closing (round, square or curly) brackets can be placed at the end of the expression, or on separate lines, but then should be indented the same as the line with the corresponding opening bracket.

使用 4 个空格缩进代码块,永远不要用 Tabs。

References

1\] Yongqiang Cheng (程永强), \[2\] Google Python Style Guide,

相关推荐
hui函数1 天前
Python系列Bug修复PyCharm控制台pip install报错:如何解决 pip install 网络报错 企业网关拦截 User-Agent 问题
python·pycharm·bug
arthur.dy.lee1 天前
在pycharm中使用powershell7解决conda,ohmyposh报错的问题
ide·pycharm·conda
Autumn72991 天前
【 jupyter 】PyCharm配置服务器连接jupyter
服务器·jupyter·pycharm
行走的陀螺仪1 天前
UniApp 横向可滚动 Tab 组件开发详解
uni-app·封装组件·tabs·自定义封装组件·可滚动组件tab
技术宅学长2 天前
关于CLS与mean_pooling的一些笔记
人工智能·pytorch·笔记·pycharm
love530love2 天前
EPGF 新手教程 13在 PyCharm(中文版 GUI)中创建 Hatch 项目环境,并把 Hatch 做成“项目自包含”(工具本地化为必做环节)
开发语言·ide·人工智能·windows·python·pycharm·hatch
小树苗m2 天前
将dockers通过远程ssh配置在pycharm中
运维·pycharm·ssh
love530love2 天前
EPGF 新手教程 11在 PyCharm(中文版 GUI)中创建 uv 环境,并把 uv 做到“项目自包含”(工具本地化为必做环节)
ide·人工智能·python·pycharm·conda·uv·epgf
love530love2 天前
升级到 ComfyUI Desktop v0.7.0 版本后启动日志报 KeyError: ‘tensorrt‘ 错误解决方案
开发语言·windows·python·pycharm·virtualenv·comfyui·comfyui desktop
love530love3 天前
EPGF 新手教程 12在 PyCharm(中文版 GUI)中创建 Poetry 项目环境,并把 Poetry 做成“项目自包含”(工具本地化为必做环节)
开发语言·ide·人工智能·windows·python·pycharm·epgf