{"id":27759218,"url":"https://github.com/gabdug/mypy-to-codeclimate","last_synced_at":"2025-09-22T22:16:01.668Z","repository":{"id":205137770,"uuid":"713527401","full_name":"GabDug/mypy-to-codeclimate","owner":"GabDug","description":"Standalone tool to convert a mypy output to CodeQuality JSON, for Gitlab or other CIs.","archived":false,"fork":false,"pushed_at":"2025-04-28T20:32:56.000Z","size":26,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-28T21:41:03.188Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GabDug.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-11-02T17:45:12.000Z","updated_at":"2024-08-09T08:26:20.000Z","dependencies_parsed_at":"2024-02-20T01:54:52.962Z","dependency_job_id":"f565fe85-c34b-4294-9496-81f6e3122c57","html_url":"https://github.com/GabDug/mypy-to-codeclimate","commit_stats":null,"previous_names":["gabdug/mypy-to-codeclimate"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabDug%2Fmypy-to-codeclimate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabDug%2Fmypy-to-codeclimate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabDug%2Fmypy-to-codeclimate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabDug%2Fmypy-to-codeclimate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GabDug","download_url":"https://codeload.github.com/GabDug/mypy-to-codeclimate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251495006,"owners_count":21598416,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-29T11:36:18.625Z","updated_at":"2025-09-22T22:15:56.614Z","avatar_url":"https://github.com/GabDug.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# mypy-code-climate\n\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mypy-to-codeclimate)\n[![PyPI](https://img.shields.io/pypi/v/mypy-to-codeclimate)](https://pypi.org/project/mypy-to-codeclimate/)\n[![Downloads](https://static.pepy.tech/badge/mypy-to-codeclimate/month)](https://pepy.tech/project/mypy-to-codeclimate)\n![PyPI - License](https://img.shields.io/pypi/l/mypy-to-codeclimate)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\nStandalone tool to convert Mypy output to Code Climate format. It does not require the Code Climate CLI and is dependency-free: great for CI/CD. Keeps sane exit codes for your CI.\nAdditionally, can be used as a Python library.\n\n## Why Code Climate\n\nThe Code Climate format is supported by Gitlab CI, so you can generate a Code Quality report from mypy output, and have it tracked and displayed in your Gitlab UI.\n\n## Usage\n\n```bash\nmypy-to-codeclimate \u003cmypy_output_file\u003e \u003ccode_climate_output_file\u003e\n```\n\nExample:\n\n```bash\nmypy-to-codeclimate mypy-output.txt mypy-codequality.json\n```\n\nYou can replace the filename by `-` to read from stdin, write to stdout, or both.\n\n```bash\nmypy \u003ccommand_args\u003e | mypy-to-codeclimate - mypy-codequality.json\n```\n\n### Return codes\n\n- `0`: Success, no mypy errors\n- `1`: Mypy errors, codeclimate report generated\n- `2`: Mypy crash (unexpected error) or mypy-to-codeclimate error (invalid arguments, invalid input file, etc.)\n\n\n### Options\n\n- `--version`: Print version and exit\n- `--help`: Print help and exit\n\n## Installation\n\n```bash\npip install mypy-to-codeclimate\n```\n\n\u003e The package is distributed on Pypi, so you can install it with pipx, PDM, Poetry or any other Python package manager.\n\n## Supported versions\n\n### Mypy versions\n\nTested against Mypy 1.6.1. It should work with any version of mypy that outputs the same format.\n\nPlease open an issue if you find a version of mypy that is not supported.\n\n## Example usage in Gitlab CI\n\nExample of a job that runs mypy and generates a codeclimate report, on a Linux runner.\n\nDependency management is left as an exercise for the reader.\n\nSee [Gitlab CI code-quality artifacts reference](https://docs.gitlab.com/ee/ci/yaml/artifacts_reports.html#artifactsreportscodequality)\n\n```yaml\nlint_python_mypy:\n  script:\n    - mypy --version\n    # Disable exit on error and pipefail:\n    # mypy-code-climate will return a non-zero exit code if there are errors but we want to continue the job to generate the report\n    - set +eo pipefail\n    - mypy \u003ccommand_args\u003e | tee mypy-output.txt\"\n    # Enable exit on error again\n    - set -xeo\n    - mypy-to-codeclimate mypy-output.txt mypy-codequality.json\n  artifacts:\n    when: always\n    paths:\n      - mypy-codequality.json\n    reports:\n      codequality: mypy-codequality.json\n```\n\n## License\n\nMIT, see [LICENSE](LICENSE) file.\n\n## Acknowledgements\n\nInspired by [codeclimate-mypy](https://github.com/larkinscott/codeclimate-mypy) by Scott Larkin (@larkinscott).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabdug%2Fmypy-to-codeclimate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabdug%2Fmypy-to-codeclimate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabdug%2Fmypy-to-codeclimate/lists"}