Skip to content

Commit d617570

Browse files
[primer] Add multi_package test fixture
Test comparator output across two packages with different change categories: astroid has a changed diagnostic, astropy has a new false positive and a removed message.
1 parent 2a28b5d commit d617570

4 files changed

Lines changed: 133 additions & 0 deletions

File tree

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
🤖 **Effect of this PR on checked open source code:** 🤖
2+
3+
4+
**Effect on [astroid](https://github.com/pylint-dev/astroid):**
5+
6+
The following messages are now emitted:
7+
8+
<details>
9+
10+
1) too-complex:
11+
*'my_function' is too complex. The McCabe rating is 17*
12+
https://github.com/pylint-dev/astroid/blob/123456789abcdef/astroid/node_classes.py#L105
13+
</details>
14+
15+
The following messages are no longer emitted:
16+
17+
<details>
18+
19+
1) too-complex:
20+
*'my_function' is too complex. The McCabe rating is 18*
21+
https://github.com/pylint-dev/astroid/blob/123456789abcdef/astroid/node_classes.py#L100
22+
</details>
23+
24+
25+
**Effect on [astropy](https://github.com/astropy/astropy):**
26+
27+
The following messages are now emitted:
28+
29+
<details>
30+
31+
1) locally-disabled:
32+
*Locally disabling looping-through-iterator (W4801)*
33+
https://github.com/astropy/astropy/blob/1fb40bc1f22f176254ef583065aa155f53f3b414/astropy/coordinates/angles/angle_parsetab.py#L14
34+
</details>
35+
36+
The following messages are no longer emitted:
37+
38+
<details>
39+
40+
1) useless-suppression:
41+
*Useless suppression of 'looping-through-iterator'*
42+
https://github.com/astropy/astropy/blob/1fb40bc1f22f176254ef583065aa155f53f3b414/astropy/coordinates/angles/angle_parsetab.py#L14
43+
</details>
44+
45+
*This comment was generated for commit v2.14.2*
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[
2+
{ "package": "astroid", "missing": 1, "new": 1 },
3+
{ "package": "astropy", "missing": 1, "new": 1 }
4+
]
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"astroid": {
3+
"commit": "1234567890abcdef",
4+
"messages": [
5+
{
6+
"type": "convention",
7+
"module": "astroid.node_classes",
8+
"obj": "my_function",
9+
"line": 100,
10+
"column": 0,
11+
"endLine": 100,
12+
"endColumn": 15,
13+
"path": "tests/.pylint_primer_tests/pylint-dev/astroid/astroid/node_classes.py",
14+
"symbol": "too-complex",
15+
"message": "'my_function' is too complex. The McCabe rating is 18",
16+
"messageId": "R1260",
17+
"confidence": "UNDEFINED",
18+
"absolutePath": "tests/.pylint_primer_tests/pylint-dev/astroid/astroid/node_classes.py"
19+
}
20+
]
21+
},
22+
"astropy": {
23+
"commit": "1fb40bc1f22f176254ef583065aa155f53f3b414",
24+
"messages": [
25+
{
26+
"type": "warning",
27+
"module": "astropy.coordinates.angles.angle_parsetab",
28+
"obj": "",
29+
"line": 14,
30+
"column": 0,
31+
"endLine": null,
32+
"endColumn": null,
33+
"path": "tests/.pylint_primer_tests/astropy/astropy/astropy/coordinates/angles/angle_parsetab.py",
34+
"symbol": "useless-suppression",
35+
"message": "Useless suppression of 'looping-through-iterator'",
36+
"messageId": "I0021",
37+
"confidence": "UNDEFINED",
38+
"absolutePath": "tests/.pylint_primer_tests/astropy/astropy/astropy/coordinates/angles/angle_parsetab.py"
39+
}
40+
]
41+
}
42+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"astroid": {
3+
"commit": "123456789abcdef",
4+
"messages": [
5+
{
6+
"type": "convention",
7+
"module": "astroid.node_classes",
8+
"obj": "my_function",
9+
"line": 105,
10+
"column": 0,
11+
"endLine": 105,
12+
"endColumn": 15,
13+
"path": "tests/.pylint_primer_tests/pylint-dev/astroid/astroid/node_classes.py",
14+
"symbol": "too-complex",
15+
"message": "'my_function' is too complex. The McCabe rating is 17",
16+
"messageId": "R1260",
17+
"confidence": "UNDEFINED",
18+
"absolutePath": "tests/.pylint_primer_tests/pylint-dev/astroid/astroid/node_classes.py"
19+
}
20+
]
21+
},
22+
"astropy": {
23+
"commit": "1fb40bc1f22f176254ef583065aa155f53f3b414",
24+
"messages": [
25+
{
26+
"type": "info",
27+
"module": "astropy.coordinates.angles.angle_parsetab",
28+
"obj": "",
29+
"line": 14,
30+
"column": 0,
31+
"endLine": null,
32+
"endColumn": null,
33+
"path": "tests/.pylint_primer_tests/astropy/astropy/astropy/coordinates/angles/angle_parsetab.py",
34+
"symbol": "locally-disabled",
35+
"message": "Locally disabling looping-through-iterator (W4801)",
36+
"messageId": "I0011",
37+
"confidence": "UNDEFINED",
38+
"absolutePath": "tests/.pylint_primer_tests/astropy/astropy/astropy/coordinates/angles/angle_parsetab.py"
39+
}
40+
]
41+
}
42+
}

0 commit comments

Comments
 (0)