Skip to content

Commit aa27722

Browse files
authored
Merge pull request #4 from konflux-ci/ISV-5856
feat(ISV-5856): Add CLI interface + generators
2 parents 4bfd168 + a95736b commit aa27722

18 files changed

+841
-33
lines changed

.github/workflows/release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Release python package
3-
on:
3+
on: # yamllint disable-line rule:truthy
44
push:
55
tags:
66
- 'v*'

poetry.lock

+141-21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+26
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,30 @@ repository = "https://github.com/konflux-ci/mobster"
3535
[project.scripts]
3636
mobster = "mobster.main:main"
3737

38+
[tool.ruff]
39+
line-length = 88
40+
target-version = "py310"
41+
42+
[tool.ruff.lint]
43+
select = [
44+
"E", # pycodestyle errors
45+
"W", # pycodestyle warnings
46+
"F", # pyflakes
47+
"I", # isort
48+
"B", # flake8-bugbear
49+
"C4", # flake8-comprehensions
50+
"UP", # pyupgrade
51+
]
52+
53+
[tool.mypy]
54+
strict = true
55+
56+
[[tool.mypy.overrides]]
57+
module = "tests.*"
58+
ignore_missing_imports = true
59+
disable_error_code = ["import-untyped"]
60+
61+
3862
[tool.poetry]
3963
packages = [{ include = "mobster", from = "src" }]
4064

@@ -48,6 +72,8 @@ mypy = "^1.15.0"
4872
yamllint = "^1.37.0"
4973
tox = "^4.25.0"
5074
pip-audit = "^2.9.0"
75+
pylint = "^3.3.7"
76+
pytest-asyncio = "^0.26.0"
5177

5278
[build-system]
5379
requires = ["poetry-core>=2.0.0,<3.0.0"]

scripts/pip-audit-parse.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/usr/bin/env python3
2-
import json
32
import argparse
4-
from typing import Dict, Any
3+
import json
4+
from typing import Any
55

6-
from rich.table import Table
76
from rich.console import Console
7+
from rich.table import Table
88

99

10-
def parse_vulnerabilities_json(data: Dict[str, Any]) -> bool:
10+
def parse_vulnerabilities_json(data: dict[str, Any]) -> bool:
1111
"""
1212
Parses pip-audit json output, extracts fixable vulnerabilities
1313
and pretty prints them.
@@ -63,7 +63,7 @@ def main() -> None:
6363
parser.add_argument("filename", help="The JSON file to process")
6464

6565
args = parser.parse_args()
66-
with open(args.filename, "r") as file:
66+
with open(args.filename) as file:
6767
data = json.load(file)
6868

6969
if not parse_vulnerabilities_json(data):

0 commit comments

Comments
 (0)