首页 > 编程语言 > 详细

python3:unexpected indent?indent expected?autopep8!

时间:2020-05-24 10:03:27      阅读:163      评论:0      收藏:0      [点我收藏+]

unexpected indent 实在是无法忍受

Win键(就是windows图标那个键)+R 呼出CMD命令行工具(powershell也行):
linux+mac一样呼出终端工具

pip install autopep8

在Pycharm的tools中添加autopep8

File -> Settings (快捷键Ctrl + Alt + S) - > Tools -> External Tools -> 点+号

Name:autopep8
Programs:autopep8(前提是你已经安装了哦)
Arguments:--in-place --aggressive --aggressive $FilePath$
Working directory:$ProjectFileDir$
Output Filters:$FILE_PATH$\:$LINE$\:$COLUMN$\:.*

技术分享图片

使用pep8遇到de问题

执行External Tools=》autopep8

3:46 Error running ‘autopep8‘: Cannot run program "autopep8" (in directory "F:\PycharmProjects\untitled"): CreateProcess error=2, 系统找不到指定的文件。

Programs那autopep8写exe文件的绝对路径就好了

还解决不了怎么办?

def get_info():
url = ?

↑ 你肯定是这种忘记缩进了

def get_info():
      url = ?

↑ 要像这样缩进

python3:unexpected indent?indent expected?autopep8!

原文:https://www.cnblogs.com/legiorange/p/12945532.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!