Skip to content
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

Bump flake8-pyi from 22.11.0 to 23.11.0 #896

Closed
wants to merge 1 commit into from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 8, 2023

Bumps flake8-pyi from 22.11.0 to 23.11.0.

Release notes

Sourced from flake8-pyi's releases.

23.11.0

New error codes:

  • 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].

Other changes:

  • The undocumented pyi.__version__ and pyi.PyiTreeChecker.version attributes has been removed. Use flake8 --version from the command line, or importlib.metadata.version("flake8_pyi") at runtime, to determine the version of flake8-pyi installed at runtime.
  • Y038 now flags from typing_extensions import AbstractSet as well as from typing import AbstractSet.
  • 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. While reliably determining whether a class is a metaclass in all cases would be impossible for flake8-pyi, the new heuristics should reduce the number of false positives from this check.
  • 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.

23.10.0

  • 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".

    This error code is disabled by default due to the risk of false-positive errors. To enable it, use the --extend-select=Y090 option.

  • Y011 now ignores sentinel and _typeshed.sentinel in default values.

23.6.0

Features:

  • Support Python 3.12
  • Support PEP 695 syntax for declaring type aliases
  • Correctly emit Y019 errors for PEP-695 methods that are generic around a TypeVar instead of returning typing_extensions.Self
  • Introduce Y057: Do not use typing.ByteString or collections.abc.ByteString. These types have unclear semantics, and are deprecated; use typing_extensions.Buffer or a union such as bytes | bytearray | memoryview instead. See PEP 688 for more details.
  • The way in which flake8-pyi modifies pyflakes runs has been improved:
    • When flake8-pyi is installed, pyflakes will now complain about forward references in default values for function and method parameters (the same as pyflakes does when it checks .py files). Unlike in .py files, forward references in default values are legal in stub files. However, they are never necessary, and are considered bad style. (Forward references for parameter annotations are still allowed.)

      Contributed by tomasr8.

    • When flake8-pyi is installed, pyflakes's F822 check now produces many fewer false positives when flake8 is run on .pyi files. It now understands that x: int in a stub file is sufficient for x to be considered "bound", and that "x" can therefore be included in __all__.

Bugfixes:

  • Y018, Y046, Y047 and Y049 previously failed to detect unused TypeVars/ParamSpecs/TypeAliases/TypedDicts/Protocols if the object in question had multiple definitions in the same file (e.g. across two branches of an if sys.version_info >= (3, 10) check). This bug has now been fixed.
  • Y020 was previously not emitted if quoted annotations were used in TypeVar constraints. This bug has now been fixed.

Other changes:

  • flake8-pyi no longer supports being run on Python 3.7, which has reached its end of life.
  • flake8-pyi no longer supports being run with flake8 <v6.

23.5.0

  • flake8-pyi no longer supports being run with flake8 <5.0.4.
  • The way in which flake8-pyi modifies pyflakes runs has been improved:
    • When flake8-pyi is installed, pyflakes now correctly recognises an annotation as being equivalent to a binding assignment in a stub file, reducing false positives from flake8's F821 error code.
    • When flake8-pyi is installed, there are now fewer pyflakes positives from class definitions that have forward references in the bases tuple for the purpose of creating recursive or circular type definitions. These are invalid in .py files,

... (truncated)

Changelog

Sourced from flake8-pyi's changelog.

23.11.0

New error codes:

  • 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].

Other changes:

  • The undocumented pyi.__version__ and pyi.PyiTreeChecker.version attributes has been removed. Use flake8 --version from the command line, or importlib.metadata.version("flake8_pyi") at runtime, to determine the version of flake8-pyi installed at runtime.
  • Y038 now flags from typing_extensions import AbstractSet as well as from typing import AbstractSet.
  • 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. While reliably determining whether a class is a metaclass in all cases would be impossible for flake8-pyi, the new heuristics should reduce the number of false positives from this check.
  • 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.

23.10.0

  • 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".

    This error code is disabled by default due to the risk of false-positive errors. To enable it, use the --extend-select=Y090 option.

  • Y011 now ignores sentinel and _typeshed.sentinel in default values.

23.6.0

Features:

  • Support Python 3.12
  • Support PEP 695 syntax for declaring type aliases
  • Correctly emit Y019 errors for PEP-695 methods that are generic around a TypeVar

... (truncated)

Commits

Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

@dependabot dependabot bot requested a review from asvetlov as a code owner November 8, 2023 23:22
@dependabot dependabot bot added autosquash dependencies Pull requests that update a dependency file labels Nov 8, 2023
@github-actions github-actions bot enabled auto-merge (squash) November 8, 2023 23:22
Bumps [flake8-pyi](https://github.com/PyCQA/flake8-pyi) from 22.11.0 to 23.11.0.
- [Release notes](https://github.com/PyCQA/flake8-pyi/releases)
- [Changelog](https://github.com/PyCQA/flake8-pyi/blob/main/CHANGELOG.md)
- [Commits](PyCQA/flake8-pyi@22.11.0...23.11.0)

---
updated-dependencies:
- dependency-name: flake8-pyi
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@webknjaz webknjaz force-pushed the dependabot/pip/flake8-pyi-23.11.0 branch from 7a00503 to 5649c8b Compare January 4, 2024 04:20
Copy link
Contributor Author

dependabot bot commented on behalf of github Jan 5, 2024

A newer version of flake8-pyi exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged.

@webknjaz
Copy link
Member

0158502

@webknjaz webknjaz closed this Jan 16, 2024
auto-merge was automatically disabled January 16, 2024 21:37

Pull request was closed

Copy link
Contributor Author

dependabot bot commented on behalf of github Jan 16, 2024

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot dependabot bot deleted the dependabot/pip/flake8-pyi-23.11.0 branch January 16, 2024 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosquash dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant