dry-python / lambdas

Write short and fully-typed lambdas where you need them.
BSD 2-Clause "Simplified" License
270 stars 5 forks source link

Bump flake8-pyi from 22.8.2 to 23.4.1 #170

Closed dependabot[bot] closed 1 year ago

dependabot[bot] commented 1 year ago

Bumps flake8-pyi from 22.8.2 to 23.4.1.

Release notes

Sourced from flake8-pyi's releases.

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.

23.1.1

New error codes:

  • Y052: Disallow default values in global or class namespaces where the assignment does not have a type annotation. Stubs should be explicit about the type of all variables in the stub; without type annotations, the type checker is forced to make inferences, which may have unpredictable consequences. Enum members are excluded from this check, as are various special assignments such as __all__ and __match_args__.

Other changes:

  • Disallow numeric default values where len(str(default)) > 7. If a function has a default value where the string representation is greater than 7 characters, it is likely to be an implementation detail or a constant that varies depending on the system you're running on, such as sys.maxsize.
  • Disallow str or bytes defaults where the default is >50 characters long, for similar reasons.
  • Allow ast.Attribute nodes as default values for a small number of special cases, such as sys.maxsize and sys.executable.
  • Fewer Y020 false positives are now emitted when encountering default values in stub files.

23.1.0

Bugfixes:

  • Do not emit Y020 (quoted annotations) for strings in parameter defaults.
  • Fix checking of defaults for functions with positional-only parameters.

Other changes:

  • Modify Y036 so that _typeshed.Unused is allowed as an annotation for parameters in __(a)exit__ methods. Contributed by Avasam
  • Several changes have been made to error codes relating to imports:
    • The Y027 error code has been removed.
    • All errors that used to result in Y027 being emitted now result in Y022 being emitted instead.
    • Some errors that used to result in Y023 being emitted now result in Y022 being emitted instead.
    • typing.Match and typing.Pattern have been added to the list of imports banned by Y022. Use re.Match and re.Pattern instead.
  • flake8-pyi no longer supports stub files that aim to support Python 2. If your stubs need to support Python 2, pin flake8-pyi to 22.11.0 or lower.
  • Y011, Y014 and Y015 have all been significantly relaxed. None, bools, ints, floats, complex numbers, strings and bytes are all now allowed as default values for parameter annotations or assignments.
  • Hatchling is now used as the build backend. This should have minimal, if any, user-facing impact.

22.11.0

Bugfixes:

... (truncated)

Changelog

Sourced from flake8-pyi's changelog.

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; 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.

23.1.1

New error codes:

  • Y052: Disallow default values in global or class namespaces where the assignment does not have a type annotation. Stubs should be explicit about the type of all variables in the stub; without type annotations, the type checker is forced to make inferences, which may have unpredictable

... (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 show 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)
dependabot[bot] commented 1 year ago

Looks like flake8-pyi is up-to-date now, so this is no longer needed.