chore(deps): update pytype and pyright#11595
Merged
Conversation
| def index(self, item: _T, __start: SupportsIndex = 0, __stop: SupportsIndex = sys.maxsize) -> int: ... | ||
| # The runtime signature is "item, *args", and the arguments are then passed | ||
| # to `list.index`. In order to give more precise types, we pretend that the | ||
| # `item` argument is positional-only. |
Member
There was a problem hiding this comment.
This is a bit unfortunate because it disallows a legal call lst.index(item="x"). However, it's unlikely anyone would write that, and I don't see a better alternative that preserves type safety.
This comment has been minimized.
This comment has been minimized.
Member
|
OK I think the only remaining failures are the third-party stubtest on Mac, which fail with some mysterious uv failure (#11594). |
Contributor
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
srittau
approved these changes
Mar 14, 2024
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.
This PR contains the following updates:
1.1.350->1.1.354==2024.2.27->==2024.3.11Release Notes
Microsoft/pyright (pyright)
v1.1.354: Published 1.1.354Compare Source
Bug Fixes:
complex()orfloat()class pattern.typing.TypeAliasannotation.ClassVarwithout an explicit type.Enhancements:
typefunction when it is passed a class. Pyright previously evaluated this asAny, but now it returns the class' metaclass.reportUnhashablediagnostic rule.v1.1.353: Published 1.1.353Compare Source
Breaking Changes:
Enhancements:
Bug Fixes:
matchstatement is used in a loop and the subject expression is potentially narrowed as a result of thematchstatement.Annotatedpassed as second argument toNewTypecall.__new__method of a constructor if it is overloaded.__package__. It should bestr | Nonerather thanstr.isinstancetype guard logic. It was not properly handling tuples that included unions.strmethod docstrings are showed when called onLiteralString.v1.1.352: Published 1.1.352Compare Source
Enhancements:
@deprecateddecorator.enum.nonmemberin cases where the attribute has a declared type.InitVaroutside of a dataclass.Behavior Changes:
andandoroperators.Bug Fixes:
TypedDictorProtocolas an upper bound when using PEP 695 syntax.__init__.pyfile uses the formfrom .a import a.awaitexpression is passed as an argument to an overloaded function.v1.1.351: Published 1.1.351Compare Source
Bug Fixes:
Enumsubclass overrides__new__or__init__and then a subclass of that class assigns tuple values when defining enum membersenum.nonmembervalue is assigned to a class-scoped variable with a type annotation in an Enum class.reportUnknownArgumentTypeerror when assigning an empty list or dict expression to an index expression subscripted with a slice.updateon a TypedDict with zero defined entries.reportUnnecessaryCastcheck if the second argument is a special form.Behavior Changes:
__or__. In the case where the metaclass derives from Any or Unknown, pyright now assumes that it doesn't override__or__.--watchmode. Previously, it reported diagnostic deltas when it detected a change, but it is more useful if it reports all remaining diagnostics even for files that it didn't reanalyze due to a file change.Enhancements:
Configuration
📅 Schedule: Branch creation - "before 4am" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by Mend Renovate. View repository job log here.