Recommended autoformatters?
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- documentation
Research direction
Start in docs/writing/style.rst at the existing autopep8 mention, then review the linked comparison of autopep8, black, and yapf. Update the Code Style document with guidance on these formatters and a clear recommendation or comparison; the section should explain how developers can choose an autoformatter.
Written by the indexing model from the issue text.
Description
In the Code Style document https://github.com/realpython/python-guide/blob/master/docs/writing/style.rst there's a small mention of autopep8 which can be used to format code to meet PEP8 standards. But there's at least two other autoformatters (black and yapf) which are as good if not better. There's a blog comparing the three here: https://medium.com/3yourmind/auto-formatters-for-python-8925065f9505
The gist of it is: autopep8 is the most conservative, black is the most opinionated, and yapf is somewhere in between depending on how you configure it.
Should the python guide have an opinion on which auto formatters should be used? In addition to the current mention of autopep8. I think it would be good to expand this section; auto formatters are quite useful and of great interest to developers coming from tools like gofmt and prettier.
- Dominant language
- Batchfile
- Stars
- 29.8k
- Forks
- 5.9k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from realpython/python-guide
-
Page 404 error Open
Difficulty 1/5 Under an hour Newbie friendliness 65/100
realpython/python-guide#1104 · 2 comments ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 62/100
realpython/python-guide#327 ·
-
PyZMQ improvements Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
realpython/python-guide#326 · 5 comments ·
-
@alex Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
realpython/python-guide#1194 ·
-
Development Team SAP Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
realpython/python-guide#1192 ·
All issues in realpython/python-guide
Similar issues
-
area:dictation documentation P2
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
uttrflow/uttrflow-swift#1180 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
githubnext/gh-aw-workshop#3692 ·
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
falcosecurity/falco-website#1601 ·
-
specification
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
WICG/webmonetization#729 ·