Merge ~lgp171188/lpci:fix-warning-yaml-formatting into lpci:main

Proposed by Guruprasad
Status: Merged
Approved by: Guruprasad
Approved revision: cdba9bcb45cc081e81249a03dc4fa354c58c53c5
Merged at revision: cdba9bcb45cc081e81249a03dc4fa354c58c53c5
Proposed branch: ~lgp171188/lpci:fix-warning-yaml-formatting
Merge into: lpci:main
Diff against target: 51 lines (+8/-4)
3 files modified
NEWS.rst (+4/-0)
lpci/config.py (+3/-3)
setup.cfg (+1/-1)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Ines Almeida Approve
Review via email: mp+441437@code.launchpad.net

Commit message

Fix the yaml formatting in the snap deprecated format warning

To post a comment you must log in.
Revision history for this message
Guruprasad (lgp171188) wrote :

Before:
```
Warning: You configured snap `go` but you used a deprecated format.
Please use
...
-name: go
 classic: True
...
instead.
Please refer to the documentation for an overview of supported formats.
```

After:
```
Warning: You configured snap `go` but you used a deprecated format.
Please use
...
- name: go
  classic: True
...
instead.
Please refer to the documentation for an overview of supported formats.
```

Revision history for this message
Ines Almeida (ines-almeida) wrote :

LGTM 👍

review: Approve
Revision history for this message
Colin Watson (cjwatson) :
review: Approve
Revision history for this message
Guruprasad (lgp171188) :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/NEWS.rst b/NEWS.rst
2index 0006277..1b964bc 100644
3--- a/NEWS.rst
4+++ b/NEWS.rst
5@@ -2,6 +2,10 @@
6 Version history
7 ===============
8
9+0.1.1 (unreleased)
10+==================
11+- Fix the yaml formatting in the snap deprecated format warning.
12+
13 0.1.0 (2023-04-18)
14 ==================
15
16diff --git a/lpci/config.py b/lpci/config.py
17index c402afb..8e3f77a 100644
18--- a/lpci/config.py
19+++ b/lpci/config.py
20@@ -309,8 +309,8 @@ class Job(ModelConfigDefaults):
21 f"Warning: You configured snap `{value}` but "
22 + "you used a deprecated format. "
23 + "\nPlease use "
24- + f"\n...\n-name: {value}\n"
25- + " classic: True\n...\n"
26+ + f"\n...\n- name: {value}\n"
27+ + " classic: true\n...\n"
28 + "instead.\n"
29 + "Please refer to the documentation for an "
30 + "overview of supported formats.",
31@@ -327,7 +327,7 @@ class Job(ModelConfigDefaults):
32 raise ValueError(
33 "You configured a Snap `classic`, "
34 + "but you did not specify a valid value. "
35- + "Valid values would either be `True` or `False`."
36+ + "Valid values would either be `true` or `false`."
37 )
38 clean_values.append(value)
39 else:
40diff --git a/setup.cfg b/setup.cfg
41index 05d65ba..76801a6 100644
42--- a/setup.cfg
43+++ b/setup.cfg
44@@ -1,6 +1,6 @@
45 [metadata]
46 name = lpci
47-version = 0.1.0
48+version = 0.1.1.dev0
49 description = Runner for Launchpad CI jobs
50 long_description = file: README.rst
51 long_description_content_type = text/x-rst

Subscribers

People subscribed via source and target branches