Skip to content

Commit e1c7147

Browse files
authored
Add a few more checks to the pylint ignore list (#208)
This is to avoid double reporting of some checks that are already performed by `flake8`. Also sort the list alphabetically so it is easier to find a specific check.
2 parents aa01d48 + e4b9301 commit e1c7147

File tree

8 files changed

+29
-9
lines changed

8 files changed

+29
-9
lines changed

RELEASE_NOTES.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,21 @@
1010

1111
### Cookiecutter template
1212

13-
<!-- Here upgrade steps for cookiecutter specifically -->
13+
To upgrade without regenerating the project, you can follow these steps:
14+
15+
- Run the following command to add the new `pylint` ignore rules:
16+
17+
```sh
18+
sed '/ # Checked by flake8/a\ "redefined-outer-name",\n "unused-import",' pyproject.toml
19+
```
1420

1521
## New Features
1622

1723
<!-- Here goes the main new features and examples or instructions on how to use them -->
1824

1925
### Cookiecutter template
2026

21-
<!-- Here new features for cookiecutter specifically -->
27+
- Some checks that are already performed by `flake8` are now disabled in `pylint` to avoid double reporting.
2228

2329
## Bug Fixes
2430

cookiecutter/{{cookiecutter.github_repo_name}}/pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,10 @@ disable = [
165165
"unsubscriptable-object",
166166
# Checked by flake8
167167
"line-too-long",
168-
"unused-variable",
168+
"redefined-outer-name",
169169
"unnecessary-lambda-assignment",
170+
"unused-import",
171+
"unused-variable",
170172
]
171173

172174
[tool.pytest.ini_options]

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,10 @@ disable = [
163163
"unsubscriptable-object",
164164
# Checked by flake8
165165
"line-too-long",
166-
"unused-variable",
166+
"redefined-outer-name",
167167
"unnecessary-lambda-assignment",
168+
"unused-import",
169+
"unused-variable",
168170
]
169171

170172
[tool.mypy]

tests_golden/integration/test_cookiecutter_generation/actor/frequenz-actor-test/pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,10 @@ disable = [
139139
"unsubscriptable-object",
140140
# Checked by flake8
141141
"line-too-long",
142-
"unused-variable",
142+
"redefined-outer-name",
143143
"unnecessary-lambda-assignment",
144+
"unused-import",
145+
"unused-variable",
144146
]
145147

146148
[tool.pytest.ini_options]

tests_golden/integration/test_cookiecutter_generation/api/frequenz-api-test/pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,10 @@ disable = [
134134
"unsubscriptable-object",
135135
# Checked by flake8
136136
"line-too-long",
137-
"unused-variable",
137+
"redefined-outer-name",
138138
"unnecessary-lambda-assignment",
139+
"unused-import",
140+
"unused-variable",
139141
]
140142

141143
[tool.pytest.ini_options]

tests_golden/integration/test_cookiecutter_generation/app/frequenz-app-test/pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,10 @@ disable = [
138138
"unsubscriptable-object",
139139
# Checked by flake8
140140
"line-too-long",
141-
"unused-variable",
141+
"redefined-outer-name",
142142
"unnecessary-lambda-assignment",
143+
"unused-import",
144+
"unused-variable",
143145
]
144146

145147
[tool.pytest.ini_options]

tests_golden/integration/test_cookiecutter_generation/lib/frequenz-test-python/pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,10 @@ disable = [
135135
"unsubscriptable-object",
136136
# Checked by flake8
137137
"line-too-long",
138-
"unused-variable",
138+
"redefined-outer-name",
139139
"unnecessary-lambda-assignment",
140+
"unused-import",
141+
"unused-variable",
140142
]
141143

142144
[tool.pytest.ini_options]

tests_golden/integration/test_cookiecutter_generation/model/frequenz-model-test/pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,10 @@ disable = [
139139
"unsubscriptable-object",
140140
# Checked by flake8
141141
"line-too-long",
142-
"unused-variable",
142+
"redefined-outer-name",
143143
"unnecessary-lambda-assignment",
144+
"unused-import",
145+
"unused-variable",
144146
]
145147

146148
[tool.pytest.ini_options]

0 commit comments

Comments
 (0)