Skip to content

Commit b074cb8

Browse files
committed
Configure Neovim (and pre-commit) to run flake8 and pylint
Signed-off-by: Jonathan Springer <[email protected]>
1 parent fa92384 commit b074cb8

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

.nvim.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ vim.api.nvim_create_autocmd("FileType", {
1212
-- ALE is available at https://github.com/dense-analysis/ale
1313
vim.g.ale_linters = {
1414
make = {},
15-
python = { "mypy", "ruff" },
15+
python = { "mypy", "ruff", "flake8", "pylint" },
1616
markdown = { "markdownlint" },
1717
}
1818
vim.g.ale_python_auto_uv = 1

.pre-commit-config.yaml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,6 @@ repos:
190190
description: Removes UTF-8 byte order marker.
191191
types: [text]
192192

193-
- id: fix-encoding-pragma
194-
name: 🧹 Fix Python Encoding Pragma
195-
description: "Adds # -*- coding: utf-8 -*- to the top of python files."
196-
types: [python]
197-
198193
- id: mixed-line-ending
199194
name: 🧹 Mixed Line Ending
200195
description: Replaces or checks mixed line ending.
@@ -371,12 +366,12 @@ repos:
371366
exclude: ^tests/(.*/)?(pages|helpers|fuzzers|scripts|fixtures|migration|utils|manual|async|load)/.*\.py$
372367
args: [--pytest-test-first] # `test_.*\.py`
373368

374-
# - repo: https://github.com/pycqa/flake8
375-
# rev: 7.2.0
376-
# hooks:
377-
# - id: flake8
378-
# name: 🐍 Flake8 - Python Linter
379-
# description: Tool for style guide enforcement.
369+
- repo: https://github.com/pycqa/flake8
370+
rev: 7.2.0
371+
hooks:
372+
- id: flake8
373+
name: 🐍 Flake8 - Python Linter
374+
description: Tool for style guide enforcement.
380375

381376
# - repo: https://github.com/pycqa/bandit
382377
# rev: 1.8.3

0 commit comments

Comments
 (0)