lordmauve / lordmauve/flake8-html

Make the `find_severity` API official

Open
#20 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
50
Forks
17
PR merge metrics
No merged PRs in 30d

Description

Hi, thanks so much for this nice plugin !

I recently created a commandline tool to generate badges for tests, coverage and flake8: https://smarie.github.io/python-genbadge/

Concerning flake8, it plays very nicely with the html pages generated by your plugin, as you can see by clicking on the badge in the genbadge doc.

In order to aggregate the number of issues by severity (the 3 color codes in the html report), I have to use the flake8-html internal API, more precisely flake8_html.plugin.find_severity: https://github.com/smarie/python-genbadge/blob/main/genbadge/utils_flake8.py#L45

Indeed, flake8 by itself does not provide such severity levels. For the sake of longer-term maintenance, would it be possible to secure this function and expose it at package level (in the __init__.py) so that it can continue to be available even if the internal structure changes ?

(I proposed a PR for this)

Thanks in advance !

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 flake8_html.plugin.find_severity and the package init.py; review how the function supplies the three severity levels used by the HTML report. Done means find_severity is available at package level so consumers do not depend on the internal module path.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.