Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ jobs:
vulture mcpgateway --min-confidence 80

- id: pylint
setup: pip install pylint pylint-pydantic
cmd: pylint mcpgateway --errors-only --fail-under=10
setup: true
cmd: uv run pylint mcpgateway --fail-on E --fail-under=10

- id: interrogate
setup: pip install interrogate
Expand Down Expand Up @@ -131,6 +131,11 @@ jobs:
with:
python-version: "3.12"
cache: pip
# -----------------------------------------------------------
# Install uv
# -----------------------------------------------------------
- name: ⚡Set up uv
uses: astral-sh/setup-uv@v6

# -----------------------------------------------------------
# 2️⃣ Install Project + Dev Dependencies
Expand Down
31 changes: 20 additions & 11 deletions .nvim.lua
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@

-- Set colorcolumn to 200 for Python files only
vim.api.nvim_create_autocmd("FileType", {
pattern = "python",
callback = function()
vim.opt_local.colorcolumn = "200"
end,
pattern = "python",
callback = function()
vim.opt_local.colorcolumn = "200"
end,
})

-- Set up for line formatting .md files to a 120-character limit
vim.api.nvim_create_autocmd("FileType", {
pattern = "markdown",
callback = function()
vim.opt_local.colorcolumn = "120"
vim.opt_local.textwidth = 120
end,
})

--
-- Project settings for ALE (Asynchronous Lint Engine)
-- ALE is available at https://github.com/dense-analysis/ale
--
vim.g.ale_linters = {
make = {},
python = { "mypy", "ruff" },
markdown = { "markdownlint" },
make = {},
python = { "mypy", "ruff", "flake8", "pylint" },
markdown = { "markdownlint" },
}
vim.g.ale_python_auto_uv = 1

vim.g.ale_python_mypy_options='--no-pretty'
vim.g.ale_python_ruff_options = '--extend-select I'
vim.g.ale_markdown_markdownlint_executable = 'markdownlint-cli2'
vim.g.ale_python_mypy_options = "--no-pretty"
vim.g.ale_python_ruff_options = "--extend-select I"
vim.g.ale_markdown_markdownlint_executable = "markdownlint-cli2"

vim.g.ale_fixers = {
python = { "ruff", "black" },
Expand Down
33 changes: 14 additions & 19 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# report issues (linters). Modified files will need to be staged again.
# -----------------------------------------------------------------------------

exclude: '(^|/)(\.pre-commit-config\.yaml|normalize_special_characters\.py|test_input_validation\.py|ai_artifacts_normalizer\.py)$|(^|/)mcp-servers/templates/|(^|/)tests/load/|.*\.(jinja|j2)$' # ignore these files, all templates, load tests, and jinja files
exclude: '(^|/)(\.pre-commit-.*\.yaml|normalize_special_characters\.py|test_input_validation\.py|ai_artifacts_normalizer\.py)$|(^|/)mcp-servers/templates/|(^|/)tests/load/|.*\.(jinja|j2)$' # ignore these files, all templates, load tests, and jinja files

repos:
# -----------------------------------------------------------------------------
Expand Down Expand Up @@ -190,11 +190,6 @@ repos:
description: Removes UTF-8 byte order marker.
types: [text]

- id: fix-encoding-pragma
name: 🧹 Fix Python Encoding Pragma
description: "Adds # -*- coding: utf-8 -*- to the top of python files."
types: [python]

- id: mixed-line-ending
name: 🧹 Mixed Line Ending
description: Replaces or checks mixed line ending.
Expand Down Expand Up @@ -371,12 +366,12 @@ repos:
exclude: ^tests/(.*/)?(pages|helpers|fuzzers|scripts|fixtures|migration|utils|manual|async|load)/.*\.py$
args: [--pytest-test-first] # `test_.*\.py`

# - repo: https://github.com/pycqa/flake8
# rev: 7.2.0
# hooks:
# - id: flake8
# name: 🐍 Flake8 - Python Linter
# description: Tool for style guide enforcement.
- repo: https://github.com/pycqa/flake8
rev: 7.2.0
hooks:
- id: flake8
name: 🐍 Flake8 - Python Linter
description: Tool for style guide enforcement.

# - repo: https://github.com/pycqa/bandit
# rev: 1.8.3
Expand Down Expand Up @@ -418,13 +413,13 @@ repos:
# types_or: [ python, pyi ]
# files: ^mcpgateway/

# - repo: https://github.com/psf/black
# rev: 25.1.0
# hooks:
# - id: black
# name: 🐍 Black - Python Code Formatter
# description: The uncompromising Python code formatter.
# language_version: python3
- repo: https://github.com/psf/black
rev: 25.1.0
hooks:
- id: black
name: 🐍 Black - Python Code Formatter
description: The uncompromising Python code formatter.
language_version: python3

# - repo: https://github.com/pycqa/isort
# rev: 6.0.1
Expand Down
Loading
Loading