python3:unexpected indent?indent expected?autopep8!


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 = ?

↑ 要像这样缩进


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM