Skip to main content

Gitlab-CI PyPI - Python Version PyPI Downloads PyPI - License Ruff

mypy-gitlab-code-quality

Simple script to generate gitlab code quality report from output of mypy.

Example gitlab codequality report from gitlab documentation: Example gitlab codequality widget

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 :)

Metadata

Release files for mypy-gitlab-code-quality 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mypy-gitlab-code-quality 1.3.0
File Size Uploaded
mypy_gitlab_code_quality-1.3.0.tar.gz 4.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mypy-gitlab-code-quality 1.3.0
File Interpreter ABI Platform
mypy_gitlab_code_quality-1.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.4 kB

Release files / mypy_gitlab_code_quality-1.3.0.tar.gz

Download URL mypy_gitlab_code_quality-1.3.0.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
86e32677dbc92d7beeb85d1ea7e47f8da7a0a903959eb6a0ca3f60bf0325ca60
BLAKE2b-256 checksum
How to use checksums
810f169f94c2b3894a4f75ff584bd578831fa4164e70787801a5f79b518af9a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / mypy_gitlab_code_quality-1.3.0-py3-none-any.whl

Download URL mypy_gitlab_code_quality-1.3.0-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
88592e84aa5c50c73aec34d02fb14952248b44903148075059fe1e7b78a501ef
BLAKE2b-256 checksum
How to use checksums
62b65c79f9d5b7bb7c7567ce3027877c3d4497c29939a524305cb13d7150ca6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.12

2 release files

0.0.10

2 release files

0.0.6

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page