wemake-services / wemake-services/wemake-python-styleguide

add TooManyCommentsViolation

Open
#3,689 7 comments 0 reactions 1 assignee View on GitHub

@Khabib73 is already working on this.

Since Jun 30, 2026.

rule request
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

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.