From 62b149ccaf0bcaa84b94426f376f2093f7a4eb64 Mon Sep 17 00:00:00 2001 From: reeshika-h Date: Mon, 26 Oct 2026 16:27:52 +0530 Subject: [PATCH] Fix: replace pylint with ruff in dev requirements Remove GPL/LGPL dev-only dependencies (pylint, astroid); update docs. Co-Authored-By: Claude Sonnet 5.5 --- AGENTS.md | 6 +++--- requirements-dev.txt | 4 ++-- skills/README.md | 2 +- skills/dev-workflow/SKILL.md | 4 ++-- skills/python-style/SKILL.md | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 3d3c39f..6396b56 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -17,7 +17,7 @@ | Build | `setuptools` / `setup.py`; package `contentstack_management` | | HTTP | `requests`, `requests-toolbelt`, `urllib3` | | Tests | `pytest` — `tests/integration` (live e2e / sanity, dynamic stack), `tests/unit`, `tests/mock`, `tests/api` (legacy, superseded by `tests/integration`) | -| Lint / coverage | `pylint`, `coverage` (see `requirements-dev.txt`) | +| Lint / coverage | `ruff`, `coverage` (see `requirements-dev.txt`) | | Secrets / hooks | Talisman, Snyk (see `README.md` development setup) | ## Source layout @@ -44,7 +44,7 @@ | Test (mock) | `pytest tests/mock/ -v` | | Test (legacy API, live) | `pytest tests/api/ -v` (needs `.env` — see `tests/cred.py`) | | Coverage (CI) | `coverage run -m pytest tests/unit/` | -| Lint | `pylint contentstack_management/` | +| Lint | `ruff check contentstack_management/` | > **CI note:** `.github/workflows/unit-test.yml` runs **only `tests/unit/`** (no credentials). The `tests/integration` sanity suite is run manually (or via a credential-gated job) because it provisions real stacks. @@ -70,7 +70,7 @@ Do not commit secrets. `tests/integration/.env`, `docs/`, and the repo-root `cma | Skill | Path | What it covers | |-------|------|----------------| -| **Development workflow** | [`skills/dev-workflow/SKILL.md`](skills/dev-workflow/SKILL.md) | Install, pytest suites, packaging version, pylint, hooks, PR baseline | +| **Development workflow** | [`skills/dev-workflow/SKILL.md`](skills/dev-workflow/SKILL.md) | Install, pytest suites, packaging version, ruff, hooks, PR baseline | | **Contentstack Management (SDK)** | [`skills/contentstack-management/SKILL.md`](skills/contentstack-management/SKILL.md) | **`Client`**, **`Stack`**, **`_APIClient`**, CMA resources, OAuth, CMA docs | | **Python style & repo layout** | [`skills/python-style/SKILL.md`](skills/python-style/SKILL.md) | Package layout, naming, imports via **`_APIClient`**, secrets in logs | | **Testing** | [`skills/testing/SKILL.md`](skills/testing/SKILL.md) | pytest unit / API / mock, **`tests/cred.py`**, env hygiene | diff --git a/requirements-dev.txt b/requirements-dev.txt index 8188ec2..4f32c56 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,4 @@ # Development-only dependencies — not shipped in the production package. -# Keep linting/tools (e.g. pylint) here so production scans can exclude them. +# Keep linting/tools (e.g. ruff) here so production scans can exclude them. -r requirements.txt -pylint>=2.0.0 +ruff>=0.11.5 diff --git a/skills/README.md b/skills/README.md index ef2eea6..91dcf80 100644 --- a/skills/README.md +++ b/skills/README.md @@ -6,7 +6,7 @@ Source of truth for detailed guidance. Read **[`AGENTS.md`](../AGENTS.md)** firs | Skill folder | Use when | |--------------|----------| -| **dev-workflow** | Install, **`pytest`** (unit / API / mock), **`__version__`**, pylint, Talisman/Snyk, before PR | +| **dev-workflow** | Install, **`pytest`** (unit / API / mock), **`__version__`**, ruff, Talisman/Snyk, before PR | | **contentstack-management** | **`Client`**, **`Stack`**, **`_APIClient`**, domain modules, OAuth, CMA paths and payloads | | **python-style** | Editing **`contentstack_management/`** or **`setup.py`** / **`requirements.txt`**—layout, style, imports | | **testing** | Adding or changing tests under **`tests/`**, **`tests/cred.py`**, env for API runs | diff --git a/skills/dev-workflow/SKILL.md b/skills/dev-workflow/SKILL.md index 47c3355..4ae0f9d 100644 --- a/skills/dev-workflow/SKILL.md +++ b/skills/dev-workflow/SKILL.md @@ -1,6 +1,6 @@ --- name: dev-workflow -description: Use for install, pytest suites, versioning, pylint, hooks, and PR baseline in contentstack-management-python. +description: Use for install, pytest suites, versioning, ruff, hooks, and PR baseline in contentstack-management-python. --- # Development workflow – Contentstack Management Python @@ -30,7 +30,7 @@ description: Use for install, pytest suites, versioning, pylint, hooks, and PR b ### Tooling -- **pylint** is listed in **`requirements-dev.txt`**; follow existing style in touched files. +- **ruff** is listed in **`requirements-dev.txt`** (lint with `ruff check contentstack_management/`); follow existing style in touched files. - **Husky / Talisman / Snyk** — see **README.md** for local hook setup. ### Pull requests diff --git a/skills/python-style/SKILL.md b/skills/python-style/SKILL.md index d91ed70..0abc62a 100644 --- a/skills/python-style/SKILL.md +++ b/skills/python-style/SKILL.md @@ -1,6 +1,6 @@ --- name: python-style -description: Use for package layout under contentstack_management/, setup.py, pylint-friendly style, and imports. +description: Use for package layout under contentstack_management/, setup.py, lint-friendly style, and imports. --- # Python style and repo layout – Contentstack Management Python