-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
chore(deps): update pytype and pyright #11595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
|
OK I think the only remaining failures are the third-party stubtest on Mac, which fail with some mysterious uv failure (#11594). |
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
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.