fix: unbreak SDK generation (mypy/pylint failing since streaming PR) - #15
Merged
Conversation
Speakeasy's Compile SDK step has failed on every generation run since PR #13, so no SDK has been published since 1.0.5. Root cause: `.speakeasy/gen.yaml` had an empty `additionalDependencies`, so each `speakeasy run` regenerated `pyproject.toml` without the hand-added `connect-python`/`protobuf` deps. `uv sync --dev` then uninstalled them and the vendored `_connect` tree stopped resolving — 609 mypy errors and pylint 3.57/10 (exit 22). - gen.yaml: declare connect-python, protobuf and types-protobuf so they survive regeneration. pyproject.toml and pylintrc are gen-managed, so this is the only durable place for them. - scripts/postprocess-connect.py (new, idempotent, run at the end of generate-connect.sh): relative-ise absolute imports in the .pyi stubs (protoletariat only matches protoc's alias convention, so it skipped 46 of them), prune package-stub entries for deleted subtrees, and prepend pylint/mypy opt-outs to the generated files — protobuf codegen emits ~64k pylint messages and cannot be silenced from config. - streaming.py: rename unused on_end/on_end_sync params to _-prefixed (pylintrc already ignores those). connectrpc calls them positionally. - pyproject.toml: match the generator's output byte-for-byte so main is a fixed point. Dropping "*.pyi" from package-data is a no-op — setuptools includes stubs automatically (verified: 68 either way). Verified with a real `speakeasy run` against a scratch copy: the regenerated pyproject keeps all three deps, and _connect, the headers and streaming.py all survive. From a clean venv: mypy clean (was 223 locally), pylint 10.00/10, runtime import and client construction OK. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
rodnnnney
added a commit
that referenced
this pull request
Jul 28, 2026
…SDK) (#16) Generation has failed on every deploy since 07-26 and the SDK is stuck at 1.0.5 (07-22). #15 fixed the dependency eviction -- 520 errors down to 37 -- but generation still fails, because the checker Speakeasy's "Compile SDK" step actually runs is pyright, and #15 verified mypy and pylint. Neither `# pylint: skip-file` nor `# mypy: ignore-errors` affects pyright, so the vendored _connect stubs stayed unsuppressed (33 errors: ClassVar in extension stubs, _ExtensionDict missing from types-protobuf). The other 4 were a regression from #15. It renamed on_end's parameters to _token/_ctx/_error for pylint, reasoning that connectrpc calls them positionally -- true at runtime, but MetadataInterceptor does not mark them positional-only, so pyright matches structurally by name and _ApiKeyInterceptor stopped satisfying the protocol. - postprocess-connect.py: add a pyright header alongside the pylint/mypy ones. Only the rules the pyi plugin trips are disabled -- deliberately NOT reportMissingImports, which is what fires when pyproject.toml regenerates without connect-python. That failure must stay loud. - streaming.py: restore the protocol's parameter names, silence pylint with a targeted disable instead. Verified locally: pyright 0 errors (was 37), mypy clean across 1798 files, pylint 10.00/10, and a real client constructs through the interceptor path. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
patch sdk generation