Skip to content

Commit ecf1fc2

Browse files
authored
Add support for Flake8 (#180)
See palantir/python-language-server#656
1 parent ae83b1a commit ecf1fc2

File tree

2 files changed

+91
-2
lines changed

2 files changed

+91
-2
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Python language support for [Atom-IDE](https://ide.atom.io/), powered by the [Py
88

99
## Requirements
1010

11-
[`ide-python`](https://atom.io/packages/ide-python) requires [Atom `1.21+`](https://atom.io/), [Python language server `0.19+`](https://github.com/palantir/python-language-server) and the [`atom-ide-ui`](https://atom.io/packages/atom-ide-ui) package to expose the functionality within Atom.
11+
[`ide-python`](https://atom.io/packages/ide-python) requires [Atom `1.21+`](https://atom.io/), [Python language server `0.29+`](https://github.com/palantir/python-language-server) and the [`atom-ide-ui`](https://atom.io/packages/atom-ide-ui) package to expose the functionality within Atom.
1212

1313
## Feature Providers
1414

@@ -18,6 +18,7 @@ Python language support for [Atom-IDE](https://ide.atom.io/), powered by the [Py
1818
- [McCabe](https://github.com/PyCQA/mccabe) linter for complexity checking
1919
- [pycodestyle](https://github.com/PyCQA/pycodestyle) linter for style checking
2020
- [Pylint](https://www.pylint.org/) linter to detect various errors
21+
- [Flake8](http://flake8.pycqa.org/en/latest/) linter to detect various errors
2122
- [pydocstyle](https://github.com/PyCQA/pydocstyle) linter for docstring style checking
2223
- [autopep8](https://github.com/hhatto/autopep8) for code formatting (preferred over YAPF)
2324
- [YAPF](https://github.com/google/yapf) for code formatting
@@ -26,7 +27,7 @@ Python language support for [Atom-IDE](https://ide.atom.io/), powered by the [Py
2627

2728
### Language Server
2829

29-
Install the language server (0.25.0 or newer) with:
30+
Install the language server (0.29.0 or newer) with:
3031

3132
```bash
3233
python -m pip install 'python-language-server[all]'

package.json

+88
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"rope",
1313
"pyflakes",
1414
"pylint",
15+
"flake8",
1516
"pycodestyle",
1617
"pydocstyle",
1718
"autopep8",
@@ -396,6 +397,93 @@
396397
}
397398
}
398399
},
400+
"flake8": {
401+
"title": "Flake8",
402+
"type": "object",
403+
"properties": {
404+
"enabled": {
405+
"title": "Enabled",
406+
"order": 1,
407+
"type": "boolean",
408+
"default": false,
409+
"description": "Enable or disable Flake8."
410+
},
411+
"exclude": {
412+
"title": "Exclude",
413+
"type": "array",
414+
"default": [
415+
".svn",
416+
"CVS",
417+
".bzr",
418+
".hg",
419+
".git",
420+
"__pycache__",
421+
".tox",
422+
".eggs",
423+
"*.egg"
424+
],
425+
"items": {
426+
"type": "string"
427+
},
428+
"description": "Comma-separated list of files or directories to exclude."
429+
},
430+
"filename": {
431+
"title": "Filename",
432+
"type": "array",
433+
"default": [
434+
"*.py"
435+
],
436+
"items": {
437+
"type": "string"
438+
},
439+
"description": "Only check for filenames matching the patterns in this comma-separated list."
440+
},
441+
"hangClosing": {
442+
"title": "Hang Closing",
443+
"type": "boolean",
444+
"default": false,
445+
"description": "Hang closing bracket instead of matching indentation of opening bracket's line."
446+
},
447+
"ignore": {
448+
"title": "Ignore",
449+
"type": "array",
450+
"default": [
451+
"E121",
452+
"E123",
453+
"E126",
454+
"E226",
455+
"E24",
456+
"E704",
457+
"W503",
458+
"W504"
459+
],
460+
"items": {
461+
"type": "string"
462+
},
463+
"description": "Comma-separated list of errors and warnings to ignore (or skip)."
464+
},
465+
"maxLineLength": {
466+
"title": "Max Line Length",
467+
"type": "number",
468+
"default": 79,
469+
"description": "Maximum allowed line length for the entirety of this run."
470+
},
471+
"select": {
472+
"title": "Select",
473+
"type": "array",
474+
"default": [
475+
"E",
476+
"F",
477+
"W",
478+
"C90"
479+
],
480+
"items": {
481+
"type": "string"
482+
},
483+
"description": "Comma-separated list of errors and warnings to enable."
484+
}
485+
}
486+
},
399487
"pylint": {
400488
"title": "Pylint",
401489
"type": "object",

0 commit comments

Comments
 (0)