Skip to content

Commit 6581e2e

Browse files
committed
Include default option values in JSON
This was removed implicitly when adding a default OS to the CLI. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
1 parent 733fcd5 commit 6581e2e

22 files changed

+42
-3
lines changed

CHANGELOG.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ v0.13.2
2525

2626
- python_inspector.utils_pypi.Distribution.download_url is now a method, not a property
2727

28+
- The command line has again a default OS and Python version set.
29+
30+
- Default option values are reported in the JSON results. They were skipped before.
31+
2832
- Drop support for running on Python 3.8. You can still resolve dependencies for Python 3.8.
2933
The default command line tool Python version used for resolution is now 3.9.
3034

src/python_inspector/resolve_cli.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,6 @@ def get_pretty_options(ctx, generic_paths=False):
321321
if getattr(param, "hidden", False):
322322
continue
323323

324-
if value == param.default:
325-
continue
326-
327324
if value in (None, False):
328325
continue
329326

tests/data/azure-devops.req-310-expected.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"tool_homepageurl": "https://github.com/aboutcode-org/python-inspector",
55
"tool_version": "0.13.0",
66
"options": [
7+
"--index-url https://pypi.org/simple",
78
"--json <file>",
9+
"--operating-system linux",
810
"--python-version 310",
911
"--requirement tests/data/azure-devops.req.txt"
1012
],

tests/data/azure-devops.req-312-expected.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"tool_homepageurl": "https://github.com/aboutcode-org/python-inspector",
55
"tool_version": "0.13.0",
66
"options": [
7+
"--index-url https://pypi.org/simple",
78
"--json <file>",
9+
"--operating-system linux",
810
"--python-version 312",
911
"--requirement tests/data/azure-devops.req.txt"
1012
],

tests/data/azure-devops.req-313-expected.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"tool_homepageurl": "https://github.com/aboutcode-org/python-inspector",
55
"tool_version": "0.13.0",
66
"options": [
7+
"--index-url https://pypi.org/simple",
78
"--json <file>",
9+
"--operating-system linux",
810
"--python-version 313",
911
"--requirement tests/data/azure-devops.req.txt"
1012
],

tests/data/azure-devops.req-38-expected.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"tool_homepageurl": "https://github.com/aboutcode-org/python-inspector",
55
"tool_version": "0.13.0",
66
"options": [
7+
"--index-url https://pypi.org/simple",
78
"--json <file>",
9+
"--operating-system linux",
810
"--python-version 38",
911
"--requirement tests/data/azure-devops.req.txt"
1012
],

tests/data/default-url-expected.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"tool_homepageurl": "https://github.com/aboutcode-org/python-inspector",
55
"tool_version": "0.13.0",
66
"options": [
7+
"--index-url https://pypi.org/simple",
78
"--json <file>",
9+
"--operating-system linux",
810
"--python-version 38",
911
"--specifier zipp==3.8.0",
1012
"--use-pypi-json-api"

tests/data/environment-marker-test-requirements.txt-expected.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"tool_homepageurl": "https://github.com/aboutcode-org/python-inspector",
55
"tool_version": "0.13.0",
66
"options": [
7+
"--index-url https://pypi.org/simple",
78
"--json-pdt <file>",
9+
"--operating-system linux",
810
"--python-version 37",
911
"--requirement tests/data/environment-marker-test-requirements.txt"
1012
],

tests/data/example-requirements-ignore-errors-expected.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"tool_version": "0.13.0",
66
"options": [
77
"--ignore-errors",
8+
"--index-url https://pypi.org/simple",
89
"--json <file>",
10+
"--operating-system linux",
911
"--python-version 310",
1012
"--requirement tests/data/error-requirements.txt"
1113
],

tests/data/frozen-requirements.txt-expected.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"tool_homepageurl": "https://github.com/aboutcode-org/python-inspector",
55
"tool_version": "0.13.0",
66
"options": [
7+
"--index-url https://pypi.org/simple",
78
"--json-pdt <file>",
9+
"--operating-system linux",
810
"--python-version 38",
911
"--requirement tests/data/frozen-requirements.txt"
1012
],

0 commit comments

Comments
 (0)