Repository navigation
build: upgrade ty to 0.0.107 - #184
Open
simontaurus wants to merge 1 commit into
Open
simontaurus wants to merge 1 commit into
simontaurus wants to merge 1 commit into
Conversation
- rename the configured rules; unresolved-attribute split into
missing-attribute and missing-union-attribute
- fix what the new rules found: legacy model_validate({...}) and
v1 parse_obj fell off the end and answered None; the v1 descriptor
__iris__ override dropped the mixin's setter; from_json overrides
renamed the base's parameter; document-store format narrowed the base
- examples keep their blanket type: ignore for foreign checker configs
Contributor
Release previewNo version bump from the current commits (stays at Changelog preview (truncated)Preview via python-semantic-release and conventional commits. |
Contributor
📊 Benchmark ResultsClick to see benchmark comparisonThreshold: 1.3x (30% slower triggers a regression warning) Note: Benchmarks are informational only and won't fail the build. 💡 Tip: Download the |
This branch has not been deployed
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.
ty>=0.0.24was never a pin; the lock froze 0.0.49 at the June uv migration and every release's plainuv lockpreserved it. This re-locks to 0.0.107 and adapts the config.Changes:
[tool.ty.rules]renamed:invalid-return-type->invalid-explicit-return,invalid-method-override->incompatible-method-override,call-non-callable->not-callable;unresolved-attributesplit upstream intomissing-attribute+missing-union-attribute, both kept at the old severities (rules section and thetests/typing/**override)# ty: ignore[unresolved-import]->[import-not-found](3 sites)incompatible-attribute-overridedowngraded with rationale: pydantic v1 configuration is aConfigclass override by designexamples/**override keepsunused-type-ignore-commentquiet: the one blanket ignore there is load-bearing for downstream checker configs where the silenced rule runsWhat the new rules found, fixed rather than silenced:
model_validate({...})calledsuper().model_validatewithout returning it and fell off the end - it answeredNonefor every dict payload; v1parse_objhad the same fall-off for unmatched input (src/oold/model/__init__.py,src/oold/model/v1/__init__.py)__iris__getter-only override silently dropped the mixin's setter; direct property assignment now delegates like__setattr__already did (src/oold/model/v1/_descriptor.py)from_jsonoverrides renamed the abstract base'sjson_dictparameter todata; the base now matches, so a keyword call cannot break on an overrideformat: LinkedDataFormat | Noneto a mutableLinkedDataFormat; widened to matchOne claim from #183 corrected in the docs: attribute writes through
Optional[Link[T]]type only under pyright. ty does not apply__set__inside a union on either 0.0.49 or 0.0.107 (0.0.107 rejects even= None), so the typing probe asserts the constructor direction and the docs say so instead of calling it version-dependent.843 passed under the descriptor binding, 827 under
OOLD_DESCRIPTOR_BINDING=0;ty check0 errors (11 warnings, 10 of them the pre-existingunsupported-baseset); ruff, deptry, strict docs build clean.