Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mypy-gitlab-code-quality

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mypy-gitlab-code-quality

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

  • 1.1.0
  • PyPI
  • Socket score

Maintainers
1

Gitlab-CI PyPI - Python Version PyPI Downloads PyPI - License Code style: black 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 report

Usage

$ mypy program.py | mypy-gitlab-code-quality

This command send to STDOUT generated json that can be used as Code Quality report artifact.

Example .gitlab-ci.yml

image: python:alpine
variables:
  PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"

cache:
  paths:
    - .cache/pip/
    - venv/
    - .mypy_cache/

before_script:
  - python --version  # For debugging
  - python -m venv venv
  - . venv/bin/activate

codequality:
  script:
    - pip install mypy mypy-gitlab-code-quality
    - mypy program.py --no-error-summary > mypy-out.txt || true  # "|| true" is used for preventing job fail when mypy find errors
    - mypy-gitlab-code-quality < mypy-out.txt > 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 merge request

pip install requirements/dev.txt
black .
mypy .
ruff .

Suggestions and merge requests are always welcome :)

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc