pep8speaks
pep8speaks is back again!
一个github应用程序,可以自动查看Python代码样式,而不是拉请请求


pycodestyle或flake8之间选择作为衬里。该机器人可以读取两者的配置。[pycodestyle]机器人可以读取您的setup.cfg [flake8]查看下面的Configuration部分。集成工作不需要配置文件。但是,可以通过在项目的根部中添加.pep8speaks.yml文件来另外配置。这是一个示例:
# File : .pep8speaks.yml
scanner :
diff_only : True # If False, the entire file touched by the Pull Request is scanned for errors. If True, only the diff is scanned.
linter : pycodestyle # Other option is flake8
pycodestyle : # Same as scanner.linter value. Other option is flake8
max-line-length : 100 # Default is 79 in PEP 8
ignore : # Errors and warnings to ignore
- W504 # line break after binary operator
- E402 # module level import not at top of file
- E731 # do not assign a lambda expression, use a def
- C406 # Unnecessary list literal - rewrite as a dict literal.
- E741 # ambiguous variable name
no_blank_comment : True # If True, no comment is made on PR without any errors.
descending_issues_order : False # If True, PEP 8 issues in message will be displayed in descending order of line numbers in the file
message : # Customize the comment made by the bot
opened : # Messages when a new PR is submitted
header :
" Hello @{name}! Thanks for opening this PR. "
# The keyword {name} is converted into the author's username
footer :
" Do see the [Hitchhiker's guide to code style](https://goo.gl/hqbW4r) "
# The messages can be written as they would over GitHub
updated : # Messages when new commits are added to the PR
header : " Hello @{name}! Thanks for updating this PR. "
footer : " " # Why to comment the link to the style guide everytime? :)
no_errors : " There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers: "笔记:
.pep8speaks.yml将覆盖这些值。base分支(现有的)中查找.pep8speaks.yml 。如果找不到文件,则将搜索head分支(传入更改)。scanner.linter的价值。沿pycodestyle或flake8ignore或max-line-length ),Pep8Speaks将按以下顺序进行外观和优先级配置:pycodestyle:或flake8: .pep8speaks.yml的部分。scanner.linter值。[pycodestyle]或[flake8] setup.cfg文件的部分在项目的根部。scanner.linter 。因此, [flake8] setup.cfg的部分也将用于pycodestyle。| 组织 | 描述 | |
|---|---|---|
| 熊猫 | Python强大的数据操纵工具 | |
| Adobe | Adobe的开源 | |
| Opensuse | Linux分布 | |
| Pytorch闪电 | ML研究人员的轻量级Pytorch包装纸。 | |
| NetworkX | 图理论和复杂网络的Python库 | |
| StatsModels | Python的统计建模和计量经济学 | |
| Xarray(Pydata) | nd在Python中标记为阵列和数据集(Python for Data) | |
![]() | 太阳 | 太阳能物理学的Python |
| 天体 | Python的天文学 | |
| Scikit学习贡献 | Scikit-Learn兼容项目 | |
| Scikit图像 | Python中的图像处理 | |
| Spyder IDE | 科学的Python开发环境 | |
![]() | 催化剂 | Pytorch深度学习研发框架 |
请参阅组织和用户的完整列表。
@pep8speaks suggest diff ,它将评论DIFF的要点,建议对PR进行修复。例子@pep8speaks pep8ify在PR上,它将创建一个拉动请求,其更改autopep8建议对PR的作者分支。 autopep8解决了pycodestyle报告的大多数错误。[skip pep8]提交消息,PR标题或PR描述中的任何位置,以禁止PEP8Speaks对拉的请求发表评论。该应用程序仅适用于公开托管的存储库。因此,如果您想部署叉子或将应用程序用于私人存储库,则是说明。
pep8 )检查本地错误。使用GITHUB Release功能在此处宣布对应用程序的更新。随着社区的增长,进行了许多重大变化。单击Watch - > Releases only ,以获取有关新配置或功能更新的通知。
通常,在存储库中合并了拉动请求后,主部将立即部署。但是,在每个星期五,我都会发布一个版本,并确保部署了最新的代码。您无需采取任何行动即可使用最新版本。如果您使用Pep 8的叉子说话,请查看发布空间。
成为金牌赞助商,获取您的徽标和名称,并在我们的Readme和我们的网站上链接到您的网站。
萨马格拉治理 | ![]() samagrax |
成为金牌赞助商,获取您的徽标和名称,并在我们的Readme和我们的网站上链接到您的网站。
Python软件基金会 | 魏布拉特 |
成为银牌赞助商,获取您的徽标和名称,并在我们的Readme和我们的网站上链接到您的网站。
ccextractor | Sudhanshu Mishra |
您可以通过为其开发做出贡献来支持该项目。如果您对新功能或改进有任何建议,请创建一个问题。拉动请求是最欢迎的!阅读贡献文档以了解项目的工作原理以及如何进行更改。
该项目需要在服务器上托管,因此,它也需要财务支持。
请阅读案例,以说明Pep 8的资金。
如果您使用此项目并且喜欢它,请告诉我。谢谢!
❤️
该项目不认可原始PEP 8的所有规则,因此相信定制PyCodestyle。
。