Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CodeStyle] upgrade Lucas-C/pre-commit-hooks in .pre-commit-config.yaml #6240

Merged
merged 2 commits into from
Oct 22, 2023

Conversation

ooooo-create
Copy link
Collaborator

link #6158
升级 docs repo 中现有的代码风格检查工具版本

  • Lucas-C/pre-commit-hooks

tracking issue 待补充
@SigureMo

@paddle-bot
Copy link

paddle-bot bot commented Oct 22, 2023

感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-6240.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html
预览工具的更多说明,请参考:飞桨文档预览工具

Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

大概率会和另一个 PR 冲突,这个没改 API,应该我就可以直接合了

@@ -60,7 +60,7 @@ body:
attributes:
label: 1.导入分布式训练需要的依赖包
description: |
针对 导入分布式训练需要的依赖 这一环节,请回答以下内容
针对 导入分布式训练需要的依赖 这一环节,请回答以下内容
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
针对 导入分布式训练需要的依赖 这一环节,请回答以下内容
针对导入分布式训练需要的依赖这一环节,请回答以下内容

改成这样吧,下同

- id: remove-tabs
files: \.md$|\.rst$
types: [text]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

两个 forbid 可以删掉,因为和 remove 重复了,可以参考 Paddle 那边的,同样,下面的 check-whitespace-between-cn-and-en-char 之后也可以删掉,因为 insert-whitespace-between-cn-and-en-char 会既检查又修复

Comment on lines 35 to 38
tmp_fifofile=/tmp/$$.fifo #脚本运行的当前进程ID号作为文件名
mkfifo $tmp_fifofile #新建一个随机fifo管道文件
exec 6<>$tmp_fifofile #定义文件描述符6指向这个fifo管道文件
rm $tmp_fifofile #清空管道内容
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tmp_fifofile=/tmp/$$.fifo #脚本运行的当前进程ID号作为文件名
mkfifo $tmp_fifofile #新建一个随机fifo管道文件
exec 6<>$tmp_fifofile #定义文件描述符6指向这个fifo管道文件
rm $tmp_fifofile #清空管道内容
tmp_fifofile=/tmp/$$.fifo # 脚本运行的当前进程ID号作为文件名
mkfifo $tmp_fifofile # 新建一个随机fifo管道文件
exec 6<>$tmp_fifofile # 定义文件描述符6指向这个fifo管道文件
rm $tmp_fifofile # 清空管道内容

Comment on lines 71 to 72
wait #等到后台的进程都执行完毕
exec 6>&- ##删除文件描述符6
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
wait #等到后台的进程都执行完毕
exec 6>&- ##删除文件描述符6
wait # 等到后台的进程都执行完毕
exec 6>&- # 删除文件描述符6

@@ -2,7 +2,7 @@
{# Import the theme's layout. #}
{% extends "!layout.html" %}

{# SIDE NAV, TOGGLES ON MOBILE #}
{# SIDE NAV, TOGGLES ON MOBILE #}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{# SIDE NAV, TOGGLES ON MOBILE #}
{# SIDE NAV, TOGGLES ON MOBILE #}

直接删掉,不然会和另一个 PR 冲突

@SigureMo SigureMo added the HappyOpenSource 快乐开源活动issue与PR label Oct 22, 2023
Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTMeow 🐾

@SigureMo SigureMo merged commit 0ffecb2 into PaddlePaddle:develop Oct 22, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants