mypy-gitlab-code-quality-1.3.0
توضیحات
Simple script to generate gitlab code quality report from output of mypy.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | mypy-gitlab-code-quality-1.3.0 |
| نام | mypy-gitlab-code-quality |
| نسخه کتابخانه | 1.3.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | OokamiTheLord |
| ایمیل نویسنده | Dmitry Samsonov <dmitriy.samsonov28@gmail.com> |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/mypy-gitlab-code-quality/ |
| مجوز | MIT License Copyright (c) 2021 Dmitry Samsonov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |


[](https://pypi.org/project/mypy-gitlab-code-quality/)
[](https://pepy.tech/project/mypy-gitlab-code-quality)

[](https://github.com/astral-sh/ruff)
# mypy-gitlab-code-quality
Simple script to generate [gitlab code quality report](https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html)
from output of [mypy](http://www.mypy-lang.org/).
Example gitlab codequality report from [gitlab documentation](https://docs.gitlab.com/ee/ci/testing/code_quality.html#merge-request-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
```yaml
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
```shell
pip install requirements/dev.txt
mypy .
ruff check
ruff format
```
Suggestions and pull requests are always welcome :)
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.9 | Python |
نحوه نصب
نصب پکیج whl mypy-gitlab-code-quality-1.3.0:
pip install mypy-gitlab-code-quality-1.3.0.whl
نصب پکیج tar.gz mypy-gitlab-code-quality-1.3.0:
pip install mypy-gitlab-code-quality-1.3.0.tar.gz