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.5.0 #675

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github May 2, 2023

Bumps flake8-pyi from 22.11.0 to 23.5.0.

Release notes

Sourced from flake8-pyi's releases.

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, but are supported in stub files.

    • When flake8-pyi is installed, pyflakes will also complain about code which (in combination with flake8-pyi) it previously had no issue with. For example, it will now complain about this code:

      class Foo(Bar): ...
      class Bar: ...

      Although the above code is legal in a stub file, it is considered poor style, and the forward reference serves no purpose (there is no recursive or circular definition). As such, it is now disallowed by pyflakes when flake8-pyi is installed.

    Contributed by tomasr8.

  • Introduce Y056: Various type checkers have different levels of support for method calls on __all__. Use __all__ += ["foo", "bar"] instead, as this is known to be supported by all major type checkers.

23.4.1

  • Introduce Y055: Unions of the form type[X] | type[Y] can be simplified to type[X | Y]. Similarly, Union[type[X], type[Y]] can be simplified to type[Union[X, Y]]. Contributed by tomasr8.

23.4.0

Update error messages for Y019 and Y034 to recommend using typing_extensions.Self rather than _typeshed.Self.

23.3.1

New error codes:

  • Y053: Disallow string or bytes literals with length >50 characters. Previously this rule only applied to parameter default values; it now applies everywhere.
  • Y054: Disallow numeric literals with a string representation >10 characters long. Previously this rule only applied to parameter default values; it now applies everywhere.

Other changes:

  • Y011/Y014/Y015: Simple container literals (list, dict, tuple and set literals) are now allowed as default values.
  • Y052 is now emitted more consistently.
  • Some things that used to result in Y011, Y014 or Y015 being emitted now result in Y053 or Y054 being emitted.

23.3.0

Y011/Y014/Y015: Allow math constants math.inf, math.nan, math.e, math.pi, math.tau, and their negatives in default values. Some other semantically equivalent values, such as x = inf (from math import inf), or x = np.inf (import numpy as np), should be rewritten to x = math.inf. Contributed by XuehaiPan.

23.1.2

  • Y011/Y014/Y015: Increase the maximum character length of literal numbers in default values from 7 to 10, allowing hexadecimal representation of 32-bit integers. Contributed by Avasam.

... (truncated)

Changelog

Sourced from flake8-pyi's changelog.

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, but are supported in stub files.

    • When flake8-pyi is installed, pyflakes will also complain about code which (in combination with flake8-pyi) it previously had no issue with. For example, it will now complain about this code:

      class Foo(Bar): ...
      class Bar: ...

      Although the above code is legal in a stub file, it is considered poor style, and the forward reference serves no purpose (there is no recursive or circular definition). As such, it is now disallowed by pyflakes when flake8-pyi is installed.

    Contributed by tomasr8.

  • Introduce Y056: Various type checkers have different levels of support for method calls on __all__. Use __all__ += ["foo", "bar"] instead, as this is known to be supported by all major type checkers.

23.4.1

New error codes:

  • Y055: Unions of the form type[X] | type[Y] can be simplified to type[X | Y]. Similarly, Union[type[X], type[Y]] can be simplified to type[Union[X, Y]]. Contributed by tomasr8.

23.4.0

  • Update error messages for Y019 and Y034 to recommend using typing_extensions.Self rather than _typeshed.Self.

23.3.1

New error codes:

  • Y053: Disallow string or bytes literals with length >50 characters. Previously this rule only applied to parameter default values; it now applies everywhere.
  • Y054: Disallow numeric literals with a string representation >10 characters long. Previously this rule only applied to parameter default values;

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually 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 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)

Bumps [flake8-pyi](https://github.com/PyCQA/flake8-pyi) from 22.11.0 to 23.5.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.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants