mag*_*nie 7 python pylint jupyter-notebook linter
是否可以在 Jupyter Notebook 内部安装短绒毛绒?
pycodestyle 为 Jupyter Notebook安装类似于pylint. 您可以在 Jupyter Notebook shell 中使用以下命令:# install
!pip install pycodestyle pycodestyle_magic
# load
%load_ext pycodestyle_magic
# use
%%pycodestyle
def square_of_number(
num1, num2, num3,
num4):
return num1**2, num2**2, num3*
# Output
2:1: E302 expected 2 blank lines, found 0
3:23: W291 trailing whitespace
Run Code Online (Sandbox Code Playgroud)
是的 - 您可以使用nbQA在 Jupyter Notebook 上运行任何标准 Python 代码质量工具
例如:
pip install -U nbqa pylint
nbqa pylint notebook.ipynb
Run Code Online (Sandbox Code Playgroud)
免责声明:我是 nbQA 的作者
| 归档时间: |
|
| 查看次数: |
6517 次 |
| 最近记录: |