Repository navigation
Seek return and pyright - #3
Merged
Merged
Conversation
zsimic
commented
Apr 22, 2026
| [tool.pyright] | ||
| typeCheckingMode = "standard" | ||
| useLibraryCodeForTypes = true | ||
| reportMissingTypeStubs = false |
Contributor
Author
There was a problem hiding this comment.
Next step would be to turn on strict mode, and there would be a few more to fix with:
[tool.pyright]
include = ["seekablehttpfile"]
typeCheckingMode = "strict"
useLibraryCodeForTypes = true
reportMissingTypeStubs = "warning"
The include I could change it now actually - it just avoids the warning on setup.py referencing setuptools
Contributor
Author
There was a problem hiding this comment.
strict mode is also trivial to fix, we can do it in another PR, or I can do this one
Owner
|
Can you rebase on main and make the strict changes here? |
Configured via pyproject.toml [tool.pyright] in standard mode; runs under new tox -e typecheck. Narrowed keke Optional access in the two keke tests with an assert under the existing @skipIf guard. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Matches io.IOBase.seek semantics and makes SeekableHttpFile structurally compatible with zipfile._ZipReadable, so callers can pass it to ZipFile without a type: ignore. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
zsimic
force-pushed
the
seek-return-and-pyright
branch
from
April 22, 2026 17:02
e9ea102 to
1749619
Compare
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.
Two small quality-of-life changes, bundled since they came up together:
SeekableHttpFile.seekreturns the new positionMatches
io.IOBase.seeksemantics and makesSeekableHttpFilestructurallycompatible with
zipfile._ZipReadable, so callers can pass it toZipFilewithout a
type: ignore.Add a
pyrighttox envNew
tox -e typecheckrunspyrightin standard mode (configured viapyproject.toml). NarrowedkekeOptionalaccess in the two keke testswith an
assertunder the existing@skipIfguard — no behavior change.