-
-
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.11
Release Notes
Microsoft/pyright (pyright)
v1.1.354
: Published 1.1.354Compare Source
Bug Fixes:
complex()
orfloat()
class pattern.typing.TypeAlias
annotation.ClassVar
without an explicit type.Enhancements:
type
function when it is passed a class. Pyright previously evaluated this asAny
, but now it returns the class' metaclass.reportUnhashable
diagnostic rule.v1.1.353
: Published 1.1.353Compare Source
Breaking Changes:
Enhancements:
Bug Fixes:
match
statement is used in a loop and the subject expression is potentially narrowed as a result of thematch
statement.Annotated
passed as second argument toNewType
call.__new__
method of a constructor if it is overloaded.__package__
. It should bestr | None
rather thanstr
.isinstance
type guard logic. It was not properly handling tuples that included unions.str
method docstrings are showed when called onLiteralString
.v1.1.352
: Published 1.1.352Compare Source
Enhancements:
@deprecated
decorator.enum.nonmember
in cases where the attribute has a declared type.InitVar
outside of a dataclass.Behavior Changes:
and
andor
operators.Bug Fixes:
TypedDict
orProtocol
as an upper bound when using PEP 695 syntax.__init__.py
file uses the formfrom .a import a
.await
expression is passed as an argument to an overloaded function.v1.1.351
: Published 1.1.351Compare Source
Bug Fixes:
Enum
subclass overrides__new__
or__init__
and then a subclass of that class assigns tuple values when defining enum membersenum.nonmember
value is assigned to a class-scoped variable with a type annotation in an Enum class.reportUnknownArgumentType
error when assigning an empty list or dict expression to an index expression subscripted with a slice.update
on a TypedDict with zero defined entries.reportUnnecessaryCast
check 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__
.--watch
mode. 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.