Skip to content

Commit 15756ba

Browse files
marsfanEric Snow
authored andcommitted
Rename pep8 to pycodestyle. (microsoft#6570)
(for microsoft#410)
1 parent 7f2a6d6 commit 15756ba

30 files changed

Lines changed: 117 additions & 88 deletions

.github/test_plan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ foo = 42 # Marked as a blacklisted name.
159159
- [ ] `Select linter` lists the linter and installs it if necessary
160160
- [ ] mypy works
161161
- [ ] `Select linter` lists the linter and installs it if necessary
162-
- [ ] pep8 works
162+
- [ ] pycodestyle works
163163
- [ ] `Select linter` lists the linter and installs it if necessary
164164
- [ ] prospector works
165165
- [ ] `Select linter` lists the linter and installs it if necessary

build/existingFiles.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@
243243
"src/client/linters/linterManager.ts",
244244
"src/client/linters/lintingEngine.ts",
245245
"src/client/linters/mypy.ts",
246-
"src/client/linters/pep8.ts",
246+
"src/client/linters/pycodestyle.ts",
247247
"src/client/linters/prospector.ts",
248248
"src/client/linters/pydocstyle.ts",
249249
"src/client/linters/pylama.ts",

build/test-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ bandit
66
black ; python_version>='3.6'
77
yapf
88
pylint
9-
pep8
9+
pycodestyle
1010
prospector
1111
pydocstyle
1212
nose

data/.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
22
"python.pythonPath": "/usr/bin/python3"
3-
}
3+
}

data/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#%%
2-
print('hello')
2+
print('hello')

news/2 Fixes/410.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Replaced occuances of `pep8` with `pycodestyle.`
2+
3+
All menntions of pep8 have been replaced with pycodestyle
4+
5+
## Add script to replace outdated settings with the new ones in user settings.json
6+
7+
* python.linting.pep8Args -> python.linting.pycodestyleArgs
8+
* python.linting.pep8CategorySeverity.E -> python.linting.pycodestyleCategorySeverity.E
9+
* python.linting.pep8CategorySeverity.W -> python.linting.pycodestyleCategorySeverity.W
10+
* python.linting.pep8Enabled -> python.linting.pycodestyleEnabled
11+
* python.linting.pep8Path -> python.linting.pycodestylePath
12+
* (thanks [Marsfan](https://github.com/Marsfan))

package.json

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1936,7 +1936,8 @@
19361936
"description": "Path to mypy, you can use a custom version of mypy by modifying this setting to include the full path.",
19371937
"scope": "resource"
19381938
},
1939-
"python.linting.pep8Args": {
1939+
1940+
"python.linting.pycodestyleArgs": {
19401941
"type": "array",
19411942
"description": "Arguments passed in. Each argument is a separate item in the array.",
19421943
"default": [],
@@ -1945,10 +1946,10 @@
19451946
},
19461947
"scope": "resource"
19471948
},
1948-
"python.linting.pep8CategorySeverity.E": {
1949+
"python.linting.pycodestyleCategorySeverity.E": {
19491950
"type": "string",
19501951
"default": "Error",
1951-
"description": "Severity of Pep8 message type 'E'.",
1952+
"description": "Severity of pycodestyle message type 'E'.",
19521953
"enum": [
19531954
"Hint",
19541955
"Error",
@@ -1957,10 +1958,10 @@
19571958
],
19581959
"scope": "resource"
19591960
},
1960-
"python.linting.pep8CategorySeverity.W": {
1961+
"python.linting.pycodestyleCategorySeverity.W": {
19611962
"type": "string",
19621963
"default": "Warning",
1963-
"description": "Severity of Pep8 message type 'W'.",
1964+
"description": "Severity of pycodestyle message type 'W'.",
19641965
"enum": [
19651966
"Hint",
19661967
"Error",
@@ -1969,16 +1970,16 @@
19691970
],
19701971
"scope": "resource"
19711972
},
1972-
"python.linting.pep8Enabled": {
1973+
"python.linting.pycodestyleEnabled": {
19731974
"type": "boolean",
19741975
"default": false,
1975-
"description": "Whether to lint Python files using pep8",
1976+
"description": "Whether to lint Python files using pycodestyle",
19761977
"scope": "resource"
19771978
},
1978-
"python.linting.pep8Path": {
1979+
"python.linting.pycodestylePath": {
19791980
"type": "string",
1980-
"default": "pep8",
1981-
"description": "Path to pep8, you can use a custom version of pep8 by modifying this setting to include the full path.",
1981+
"default": "pycodestyle",
1982+
"description": "Path to pycodestyle, you can use a custom version of pycodestyle by modifying this setting to include the full path.",
19821983
"scope": "resource"
19831984
},
19841985
"python.linting.prospectorArgs": {

src/client/common/configSettings.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ export class PythonSettings implements IPythonSettings {
209209
lintOnSave: false, maxNumberOfProblems: 100,
210210
mypyArgs: [], mypyEnabled: false, mypyPath: 'mypy',
211211
banditArgs: [], banditEnabled: false, banditPath: 'bandit',
212-
pep8Args: [], pep8Enabled: false, pep8Path: 'pep8',
212+
pycodestyleArgs: [], pycodestyleEnabled: false, pycodestylePath: 'pycodestyle',
213213
pylamaArgs: [], pylamaEnabled: false, pylamaPath: 'pylama',
214214
prospectorArgs: [], prospectorEnabled: false, prospectorPath: 'prospector',
215215
pydocstyleArgs: [], pydocstyleEnabled: false, pydocstylePath: 'pydocstyle',
@@ -221,7 +221,7 @@ export class PythonSettings implements IPythonSettings {
221221
refactor: DiagnosticSeverity.Hint,
222222
warning: DiagnosticSeverity.Warning
223223
},
224-
pep8CategorySeverity: {
224+
pycodestyleCategorySeverity: {
225225
E: DiagnosticSeverity.Error,
226226
W: DiagnosticSeverity.Warning
227227
},
@@ -241,7 +241,7 @@ export class PythonSettings implements IPythonSettings {
241241
};
242242
this.linting.pylintPath = getAbsolutePath(systemVariables.resolveAny(this.linting.pylintPath), workspaceRoot);
243243
this.linting.flake8Path = getAbsolutePath(systemVariables.resolveAny(this.linting.flake8Path), workspaceRoot);
244-
this.linting.pep8Path = getAbsolutePath(systemVariables.resolveAny(this.linting.pep8Path), workspaceRoot);
244+
this.linting.pycodestylePath = getAbsolutePath(systemVariables.resolveAny(this.linting.pycodestylePath), workspaceRoot);
245245
this.linting.pylamaPath = getAbsolutePath(systemVariables.resolveAny(this.linting.pylamaPath), workspaceRoot);
246246
this.linting.prospectorPath = getAbsolutePath(systemVariables.resolveAny(this.linting.prospectorPath), workspaceRoot);
247247
this.linting.pydocstylePath = getAbsolutePath(systemVariables.resolveAny(this.linting.pydocstylePath), workspaceRoot);

src/client/common/installer/productInstaller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ function translateProductToModule(product: Product, purpose: ModuleNamePurpose):
337337
case Product.pytest: return 'pytest';
338338
case Product.autopep8: return 'autopep8';
339339
case Product.black: return 'black';
340-
case Product.pep8: return 'pep8';
340+
case Product.pycodestyle: return 'pycodestyle';
341341
case Product.pydocstyle: return 'pydocstyle';
342342
case Product.yapf: return 'yapf';
343343
case Product.flake8: return 'flake8';

src/client/common/installer/productNames.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ProductNames.set(Product.black, 'black');
1111
ProductNames.set(Product.flake8, 'flake8');
1212
ProductNames.set(Product.mypy, 'mypy');
1313
ProductNames.set(Product.nosetest, 'nosetest');
14-
ProductNames.set(Product.pep8, 'pep8');
14+
ProductNames.set(Product.pycodestyle, 'pycodestyle');
1515
ProductNames.set(Product.pylama, 'pylama');
1616
ProductNames.set(Product.prospector, 'prospector');
1717
ProductNames.set(Product.pydocstyle, 'pydocstyle');

0 commit comments

Comments
 (0)