HOW TO: Automatically Format Python Code to PEP8 Style? (+ BONUS Tips):

Опубликовано: 31 Октябрь 2024
на канале: chinamatt
16,368
147

autopep8: https://github.com/hhatto/autopep8
Autoformat: autopep8 --in-place -a -a file.py

3 Bonus tips for clean code:
• Give meaningful names to variables.
• Make functions that do one thing only.
• Create a skeleton for your code. An essay has an intro, a body, and a conclusion. In code, you have your dependencies, variables and functions, and then execution.