realpython / realpython/python-guide

Recommend pre-commit in Code Style section

Open
#645 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Batchfile
Stars
29.8k
Forks
5.9k
PR merge metrics
No merged PRs in 30d

Description

The Code Style section discusses the use of PEP8 and autopep8. Yelp's pre-commit framework allows you to formalise the use of PEP8 in a project by ensuring that PEP8/PyFlakes is run on Python code (as well as equivalent tools for other languages like JSHint). Pre-commit is not mandatory: it is something which individual developers on a project can install if they feel like it - the pre-commit framework simply allows you to share around a common set of pre-commit scripts in a sensible way.

If it is desirable to follow "Pythonicity" in a project, it is probably a good idea to suggest people enforce it at the level of version control.

If there's interest in this, I can draft some text for inclusion and submit a PR.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Code Style section, especially its discussion of PEP8 and autopep8, and review how the guide currently presents style tooling. Done means the section clearly covers the proposed pre-commit recommendation and its optional nature, with the existing guidance remaining coherent.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.