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][Typos][S-[34-35]]Fix typos(splitting,Splitting,splitted,Splited,splited) #71008

Merged
merged 3 commits into from
Feb 5, 2025

Conversation

MrXnneHang
Copy link
Contributor

@MrXnneHang MrXnneHang commented Feb 1, 2025

PR Category

User Experience

PR Types

Devs

Description

fixed:

  • Splitting
  • splitting

move to specific word:

  • splited
  • splitted

原因是过去分词和原形相同的单词无法区分动词和名词.会造成类似这样的情况:

def split_dataset():
...

# way 1
splited_dataset = split_dataset()
# way 2
split_dataset = split_dataset()

如果用了第一种写法,会被 typos 拦截:

error: `splited` should be `split`

如果不小心直接根据建议用了第二种方法,会重定义,对开发有点不太友好.需要另外找词汇来形容splited的情况.比如??(词汇贫瘠的我)

所以这里直接 ignore 了这些单词以及可能出现的形式.

…rds.

为了区分动词.
防止出现:
`splitted` -> `split`
def split_dataset():
将抛出 typos error 拼写错误:
splitted_dataset = split_dataset()
按照建议将导致重定义或者命名空间覆盖:
split_dataset = split_dataset()
@MrXnneHang MrXnneHang requested a review from SigureMo as a code owner February 1, 2025 13:25
_typos.toml Outdated
Comment on lines 52 to 55
splitted = 'splitted'
Splitted = 'Splitted'
splited = 'splited'
Splited = 'Splited'
Copy link
Member

Choose a reason for hiding this comment

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

  1. 按照字母序
  2. typos 对大小写不敏感,保留小写的 splittedsplited 即可

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@paddle-bot paddle-bot bot added the contributor External developers label Feb 1, 2025
Copy link

paddle-bot bot commented Feb 5, 2025

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

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 1190d8a into PaddlePaddle:develop Feb 5, 2025
32 checks passed
@SigureMo SigureMo added the HappyOpenSource 快乐开源活动issue与PR label Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants