wemake-services / wemake-services/wemake-python-styleguide
add TooManyCommentsViolation
@Khabib73 is already working on this.
Since Jun 30, 2026.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 430
- Avg merge
- 5h 14m
- Merged PRs (30d)
- 34
Description
Rule request
Thesis
Nowadays, developers often use an excessive number of comments, which leads to unclear code, loss of readability, increased cognitive load, trying replace good documentation.
This rule complements WPS 402..
Let's be honest: people often write comments because their code is less readable and overly complex.
Reasoning
The most appropriate solution is to introduce a new violation called TooManyCommentsViolation.
This violation would enforce a maximum of N comments inside functions or methods (and in the future, we could extend it to all files).
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.
Assessment
This issue has not been assessed yet.