Skip to content
This repository was archived by the owner on Nov 24, 2023. It is now read-only.

Commit 0238633

Browse files
authored
Replace base64 hash with MD5 (#3)
* Replace base64 hash with md5 * Bump version to 0.0.2
1 parent 3f4535b commit 0238633

File tree

4 files changed

+9
-18
lines changed

4 files changed

+9
-18
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ codequality:
3939
script:
4040
- pip install pydocstyle pydocstyle-gitlab-code-quality
4141
- pydocstyle program.py > pydocstyle-out.txt
42-
- PYTHONHASHSEED=0 pydocstyle-gitlab-code-quality < pydocstyle-out.txt > codequality.json
42+
- pydocstyle-gitlab-code-quality < pydocstyle-out.txt > codequality.json
4343
artifacts:
4444
when: always
4545
reports:

pydocstyle_gitlab_code_quality/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import json
22
import re
3+
from hashlib import md5
34
from sys import stdin
45
from typing import Generator, TextIO
56

67
from .src.cq_types import Issue, LinesStructure, LocationStructure
78
from .src.encoder import DataclassJSONEncoder
8-
from .src.hash import get_hash
99

1010

1111
def get_pydocstyle_output(output: TextIO) -> Generator[dict, None, None]:
@@ -52,7 +52,7 @@ def get_code_quality_issues() -> Generator:
5252
path=entry["path"],
5353
lines=LinesStructure(begin=int(entry["line"])),
5454
),
55-
fingerprint=get_hash(tuple(entry.values())),
55+
fingerprint=md5("".join(entry.values()).encode("utf-8")).hexdigest(),
5656
)
5757

5858

pydocstyle_gitlab_code_quality/src/hash.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

pyproject.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
[build-system]
2-
requires = ["setuptools", "wheel"]
3-
build-backend = "setuptools.build_meta"
4-
51
[project]
62
name = "pydocstyle-gitlab-code-quality"
7-
version = "0.0.1"
3+
version = "0.0.2"
84
authors = [
9-
{ name = "Aleksander Kluczka", email = "aleksander.kluczka@gmail.com" },
5+
{ name = "Aleksander Kluczka", email = "aleksander.kluczka@gmail.com" },
106
]
117
description = "Simple script to generate gitlab code quality report from output of pydocstyle."
128
readme = "README.md"
@@ -29,6 +25,10 @@ classifiers = [
2925
"Homepage" = "https://github.com/vis4rd/pydocstyle-gitlab-code-quality"
3026
"Bug Tracker" = "https://github.com/vis4rd/pydocstyle-gitlab-code-quality/issues"
3127

28+
[build-system]
29+
requires = ["setuptools", "wheel"]
30+
build-backend = "setuptools.build_meta"
31+
3232
[project.scripts]
3333
pydocstyle-gitlab-code-quality = "pydocstyle_gitlab_code_quality:main"
3434

0 commit comments

Comments
 (0)