Simple script to generate gitlab code quality report from output of mypy.
Project description
mypy-gitlab-code-quality
Simple script to generate gitlab code quality report from output of mypy.
Example gitlab codequality report from gitlab documentation:
Usage
$ mypy program.py --output=json | mypy-gitlab-code-quality
This command send to STDOUT generated json that can be used as Code Quality report artifact.
Also, this script supports plain text output parsing for backward compatability but json is recommended.
$ mypy program.py | mypy-gitlab-code-quality
Example .gitlab-ci.yml
image: python:alpine
codequality:
script:
- pip install mypy mypy-gitlab-code-quality
- mypy program.py --output=json > mypy-out.json || true # "|| true" is used for preventing job fail when mypy find errors
- mypy-gitlab-code-quality < mypy-out.json > codequality.json
artifacts:
when: always
reports:
codequality: codequality.json
Note: if you want to use this example you should replace program.py with yours module names.
Contributing
Please run linters before creating pull request
pip install requirements/dev.txt
mypy .
ruff check
ruff format
Suggestions and pull requests are always welcome :)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mypy_gitlab_code_quality-1.3.0.tar.gz.
File metadata
- Download URL: mypy_gitlab_code_quality-1.3.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86e32677dbc92d7beeb85d1ea7e47f8da7a0a903959eb6a0ca3f60bf0325ca60
|
|
| MD5 |
b08b1b53bc6ed4299b3dbfe36621d654
|
|
| BLAKE2b-256 |
810f169f94c2b3894a4f75ff584bd578831fa4164e70787801a5f79b518af9a3
|
File details
Details for the file mypy_gitlab_code_quality-1.3.0-py3-none-any.whl.
File metadata
- Download URL: mypy_gitlab_code_quality-1.3.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88592e84aa5c50c73aec34d02fb14952248b44903148075059fe1e7b78a501ef
|
|
| MD5 |
b53ac89d9a6c05ae77d25cf2e48ace57
|
|
| BLAKE2b-256 |
62b65c79f9d5b7bb7c7567ce3027877c3d4497c29939a524305cb13d7150ca6c
|