Overview

Request 1131208 accepted

- update to 23.11.0:
* Y058: Use `Iterator` rather than `Generator` as the return
value for simple `__iter__` methods, and `AsyncIterator` rather
than `AsyncGenerator` as the return value for simple `__aiter__`
methods.
* Y059: `Generic[]` should always be the last base class, if it
is present in the bases of a class.
* Y060, which flags redundant inheritance from `Generic[]`.
* Y061: Do not use `None` inside a `Literal[]` slice.
* For example, use `Literal["foo"] | None` instead of
`Literal["foo", None]`.
* Y022 and Y037 now flag more imports from `typing_extensions`.
* Y034 now attempts to avoid flagging methods inside classes
that inherit from `builtins.type`, `abc.ABCMeta` and/or
`enum.EnumMeta`. Classes that have one or more of these as
bases are metaclasses, and PEP 673 forbids the use of
`typing(_extensions).Self` for metaclasses.
* Attempting to import `typing_extensions.Text` now causes Y039
to be emitted rather than Y023.
* Y053 will no longer be emitted for the argument to
`@typing_extensions.deprecated`.
* Introduce Y090, which warns if you have an annotation such as
`tuple[int]` or `Tuple[int]`. These mean "a tuple of length 1,
in which the sole element is of type `int`". This is sometimes
what you want, but more usually you'll want `tuple[int, ...]`,
which means "a tuple of arbitrary (possibly 0) length, in
which all elements are of type `int`".
* Y011 now ignores `sentinel` and `_typeshed.sentinel` in
default values.

Request History
Dirk Mueller's avatar

dirkmueller created request

- update to 23.11.0:
* Y058: Use `Iterator` rather than `Generator` as the return
value for simple `__iter__` methods, and `AsyncIterator` rather
than `AsyncGenerator` as the return value for simple `__aiter__`
methods.
* Y059: `Generic[]` should always be the last base class, if it
is present in the bases of a class.
* Y060, which flags redundant inheritance from `Generic[]`.
* Y061: Do not use `None` inside a `Literal[]` slice.
* For example, use `Literal["foo"] | None` instead of
`Literal["foo", None]`.
* Y022 and Y037 now flag more imports from `typing_extensions`.
* Y034 now attempts to avoid flagging methods inside classes
that inherit from `builtins.type`, `abc.ABCMeta` and/or
`enum.EnumMeta`. Classes that have one or more of these as
bases are metaclasses, and PEP 673 forbids the use of
`typing(_extensions).Self` for metaclasses.
* Attempting to import `typing_extensions.Text` now causes Y039
to be emitted rather than Y023.
* Y053 will no longer be emitted for the argument to
`@typing_extensions.deprecated`.
* Introduce Y090, which warns if you have an annotation such as
`tuple[int]` or `Tuple[int]`. These mean "a tuple of length 1,
in which the sole element is of type `int`". This is sometimes
what you want, but more usually you'll want `tuple[int, ...]`,
which means "a tuple of arbitrary (possibly 0) length, in
which all elements are of type `int`".
* Y011 now ignores `sentinel` and `_typeshed.sentinel` in
default values.


Factory Auto's avatar

factory-auto added opensuse-review-team as a reviewer

Please review sources


Factory Auto's avatar

factory-auto accepted review

Check script succeeded


Staging Bot's avatar

staging-bot added openSUSE:Factory:Staging:adi:15 as a reviewer

Being evaluated by staging project "openSUSE:Factory:Staging:adi:15"


Staging Bot's avatar

staging-bot accepted review

Picked "openSUSE:Factory:Staging:adi:15"


Saul Goodman's avatar

licensedigger accepted review

The legal review is accepted preliminary. The package may require actions later on.


Dominique Leuenberger's avatar

dimstar accepted review

ok


Ana Guerrero's avatar

anag+factory accepted review

Staging Project openSUSE:Factory:Staging:adi:15 got accepted.


Ana Guerrero's avatar

anag+factory approved review

Staging Project openSUSE:Factory:Staging:adi:15 got accepted.


Ana Guerrero's avatar

anag+factory accepted request

Staging Project openSUSE:Factory:Staging:adi:15 got accepted.

openSUSE Build Service is sponsored by