Add decoupled lint/format tooling to the Python and TypeScript SDKs - #23
Merged
Merged
Conversation
Neither SDK had a linter or formatter. Add per-package tooling, kept independent so each language uses its native ecosystem. Enforcement is via CI; both SDKs declare their dev tooling so versions are reproducible. Python (sdk/python): - Ruff for lint + format; [tool.ruff] in pyproject (line-length 120, target py310, E/F/I/UP, __init__ re-export F401 ignored). - Dev tooling declared as the [dev] optional-dependencies extra (ruff, pre-commit), pinned to match .pre-commit-config.yaml. - sdk/python/.pre-commit-config.yaml scoped to sdk/python (opt-in). - Apply ruff check --fix and ruff format to the existing source. TypeScript (sdk/typescript): - ESLint (flat config, typescript-eslint) + Prettier (printWidth 120), declared as devDependencies. - lint/lint:fix/format/format:check scripts; drop one unused import. CI: - python-sdk.yml: new lint job installs .[dev] and runs ruff check + ruff format --check. - typescript-sdk.yml: new lint job runs npm run lint + format:check. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
zechengz
force-pushed
the
sdk-lint-tooling
branch
from
June 21, 2026 09:28
cfad23e to
1b99e61
Compare
zechengz
marked this pull request as ready for review
June 21, 2026 09:52
Collaborator
|
Thanks for your contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Neither SDK had a linter or formatter. This adds per-package tooling, kept decoupled so each language uses its native ecosystem. Enforcement is via CI; both SDKs declare their dev tooling so versions are reproducible. No git hooks are installed — linting runs in CI and on demand.
Python (
sdk/python)[tool.ruff]inpyproject.toml: line-length 120, targetpy310, rulesE/F/I/UP, withF401ignored for__init__.pyre-exports.[dev]optional-dependencies extra (ruff,pre-commit), pinned to match the pre-commit config and CI.sdk/python/.pre-commit-config.yaml(opt-in), scoped tosdk/python.ruff check --fixandruff formatto the existing source.TypeScript (
sdk/typescript)printWidth: 120, chosen to match existing style — near-zero churn), declared asdevDependencies.lint/lint:fix/format/format:checkscripts.CI
python-sdk.yml: newlintjob installs.[dev]and runsruff check+ruff format --check.typescript-sdk.yml: newlintjob runsnpm run lint+npm run format:check.Notes
The two SDKs are intentionally independent — Python uses the
pre-commitframework (opt-in), TypeScript uses npm scripts. There is no shared root config and no repo-wide git hook. CI is the enforcement point.Verification
ruff checkclean,ruff format --checkclean, 39 tests pass.npm run lintclean,npm run format:checkclean, build + 5 tests pass.